]> git.ipfire.org Git - thirdparty/squid.git/commit
Maintenance: Improve stability of generated automake Makefiles (#1081)
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 5 Jul 2022 22:58:13 +0000 (22:58 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 6 Jul 2022 03:39:24 +0000 (03:39 +0000)
commit52d824b56a26de3cd08a51187fb26b95800c0a37
tree0b4cb201413076ba0810ab2dc4d47cb68dd7e809
parent9b7c14a53ee35e0960aab20ab75e8a2f01719b82
Maintenance: Improve stability of generated automake Makefiles (#1081)

Our source-maintenance.sh script generates five automake Makefiles using
"git ls-files <pattern>" output as the source of filename entries. These
entries were piped through "sort -u". That problematic step is now gone:

* "sort" may not produce stable results across different locales.

* "sort" does not use the order enforced by our format-makefile-am.pl.
  That Perl script itself did not fix the order because it only ordered
  entries in *_SOURCES groups that these generated files do not use.

* "sort -u" could silently drop duplicate Makefile entries (that should
  not exist) instead of letting that Perl script warn us about them.

The first two bullets made automake Makefile generation unstable (e.g.,
502bcc7 reversed the ASCII order of en.lang and en_AU.lang entries, but
current runs in unofficial environments could reorder those entries).

format-makefile-am.pl now recognizes the generated group name patterns,
properly formatting entries in those five generated automake Makefiles.

That fix alone created persistent misleading "File ... changed: by ...
format-makefile-am.pl" NOTICEs because the Perl script was (always)
changing the _generated_ file. We now pipeline the generation and
formatting steps, applying NOTICE-generation check to the final result.

(Positive) side effect: The generated automake Makefiles now include a
notice that they are generated.
doc/manuals/language.am
errors/language.am
errors/template.am
icons/icon.am
scripts/format-makefile-am.pl
scripts/source-maintenance.sh
src/tests/Stub.am