From: Amos Jeffries Date: Mon, 22 Jun 2020 09:54:09 +0000 (+0000) Subject: Maintenance: rename .list auto-generated files to .am (#670) X-Git-Tag: 4.15-20210522-snapshot~90 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2b5ebbe;p=thirdparty%2Fsquid.git Maintenance: rename .list auto-generated files to .am (#670) The contents are automake script. Also this allows the source format enforcement to correctly detect that and enforce our automake code guidelines. --- diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 6da7e151dd..d9f0eeff0f 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -9,7 +9,7 @@ ## None of the .po or .pot are distributed for builds at this stage. ## -include $(srcdir)/language.list +include $(srcdir)/language.am EXTRA_DIST = \ - language.list + language.am diff --git a/doc/manuals/language.list b/doc/manuals/language.am similarity index 94% rename from doc/manuals/language.list rename to doc/manuals/language.am index 041dd51f44..7670c88380 100644 --- a/doc/manuals/language.list +++ b/doc/manuals/language.am @@ -6,7 +6,7 @@ ## Please see the COPYING and CONTRIBUTORS files for details. ## -TRANSLATE_LANGUAGES= \ +TRANSLATE_LANGUAGES = \ ar.lang \ cs.lang \ de.lang \ diff --git a/errors/Makefile.am b/errors/Makefile.am index 94d5aa5c30..cc70d85116 100644 --- a/errors/Makefile.am +++ b/errors/Makefile.am @@ -13,15 +13,15 @@ DEFAULT_ERROR_DIR = $(errordir) DEFAULT_STYLESHEET = $(sysconfdir)/errorpage.css ## List of automated translations possible: -include $(srcdir)/template.list -include $(srcdir)/language.list +include $(srcdir)/template.am +include $(srcdir)/language.am CLEANFILES = $(TRANSLATE_LANGUAGES) translate-warn EXTRA_DIST = \ $(ERROR_TEMPLATES) \ templates/error-details.txt \ - language.list \ - template.list \ + language.am \ + template.am \ aliases alias-link.sh alias-upgrade errorpage.css TRANSLATORS COPYRIGHT all: all-am diff --git a/errors/language.list b/errors/language.am similarity index 97% rename from errors/language.list rename to errors/language.am index 72da5a1546..12b1b2b3b4 100644 --- a/errors/language.list +++ b/errors/language.am @@ -6,7 +6,7 @@ ## Please see the COPYING and CONTRIBUTORS files for details. ## -TRANSLATE_LANGUAGES= \ +TRANSLATE_LANGUAGES = \ af.lang \ ar.lang \ az.lang \ diff --git a/errors/template.list b/errors/template.am similarity index 98% rename from errors/template.list rename to errors/template.am index 7ed690dede..6c12781e6f 100644 --- a/errors/template.list +++ b/errors/template.am @@ -6,7 +6,7 @@ ## Please see the COPYING and CONTRIBUTORS files for details. ## -ERROR_TEMPLATES= \ +ERROR_TEMPLATES = \ templates/ERR_ACCESS_DENIED \ templates/ERR_ACL_TIME_QUOTA_EXCEEDED \ templates/ERR_AGENT_CONFIGURE \ diff --git a/icons/Makefile.am b/icons/Makefile.am index 8d0f86e49e..e3366f8e5f 100644 --- a/icons/Makefile.am +++ b/icons/Makefile.am @@ -5,12 +5,15 @@ ## Please see the COPYING and CONTRIBUTORS files for details. ## -include $(top_srcdir)/icons/icon.list +include $(top_srcdir)/icons/icon.am icondir = $(datadir)/icons/silk icon_DATA = $(ICONS) -EXTRA_DIST = $(ICONS) icon.list SN.png -DISTCLEANFILES = +EXTRA_DIST = \ + $(ICONS) \ + icon.am \ + SN.png +DISTCLEANFILES = install-data-local: SN.png install-iconDATA $(INSTALL_DATA) $(srcdir)/SN.png "$(DESTDIR)$(datadir)/icons/" diff --git a/icons/icon.list b/icons/icon.am similarity index 98% rename from icons/icon.list rename to icons/icon.am index 62c7552729..a1109bc6bd 100644 --- a/icons/icon.list +++ b/icons/icon.am @@ -6,7 +6,7 @@ ## Please see the COPYING and CONTRIBUTORS files for details. ## -ICONS= \ +ICONS = \ silk/application.png \ silk/arrow_up.png \ silk/bomb.png \ @@ -56,4 +56,4 @@ ICONS= \ silk/plugin.png \ silk/script_gear.png \ silk/script_palette.png \ - silk/script.png + silk/script.png diff --git a/scripts/source-maintenance.sh b/scripts/source-maintenance.sh index 9102dd2010..47e25f892f 100755 --- a/scripts/source-maintenance.sh +++ b/scripts/source-maintenance.sh @@ -271,14 +271,13 @@ for FILENAME in `git ls-files`; do applyPluginsTo ${FILENAME} scripts/format-makefile-am.pl || return ;; - ChangeLog|CREDITS|CONTRIBUTORS|COPYING|*.list|*.png|*.po|*.pot|rfcs/|*.txt|test-suite/squidconf/empty|.bzrignore) + ChangeLog|CREDITS|CONTRIBUTORS|COPYING|*.png|*.po|*.pot|rfcs/|*.txt|test-suite/squidconf/empty|.bzrignore) # we do not enforce copyright blurbs in: # # Squid Project contributor attribution file # third-party copyright attribution file # images, # translation PO/POT - # auto-generated .list files, # license documentation files # (imported) plain-text documentation files and ChangeLogs # VCS internal files @@ -322,65 +321,31 @@ echo "" ) >lib/profiler/list mv lib/profiler/list lib/profiler/xprof_type.h +printAmFile () +{ + sed -e 's%\ \*%##%; s%/\*%##%; s%##/%##%' < scripts/boilerplate.h + echo -n "$1 =" + git ls-files $2$3 | sed -e s%$2%%g | sort -u | while read f; do + echo " \\" + echo -n " ${f}" + done + echo "" +} + # Build icons install include from current icons available -( -sed -e 's%\ \*%##%' -e 's%/\*%##%' -e 's%##/%##%' icons/icon.list +printAmFile ICONS "icons/" "silk/*" > icons/icon.am # Build templates install include from current templates available -( -sed -e 's%\ \*%##%' -e 's%/\*%##%' -e 's%##/%##%' errors/template.list +printAmFile ERROR_TEMPLATES "errors/" "templates/ERR_*" > errors/template.am # Build errors translation install include from current .PO available -( -sed -e 's%\ \*%##%' -e 's%/\*%##%' -e 's%##/%##%' errors/language.list +printAmFile TRANSLATE_LANGUAGES "errors/" "*.po" | sed 's%\.po%\.lang%g' > errors/language.am # Build manuals translation install include from current .PO available -( -sed -e 's%\ \*%##%' -e 's%/\*%##%' -e 's%##/%##%' doc/manuals/language.list +printAmFile TRANSLATE_LANGUAGES "doc/manuals/" "*.po" | sed 's%\.po%\.lang%g' > doc/manuals/language.am # Build STUB framework include from current stub_* available -( -sed -e 's%\ \*%##%' -e 's%/\*%##%' -e 's%##/%##%' src/tests/Stub.list +printAmFile STUB_SOURCE "src/" "tests/stub_*.cc" > src/tests/Stub.am # Build the GPERF generated content make -C src/http gperf-files diff --git a/src/Makefile.am b/src/Makefile.am index 5caacaf1f5..72e5611d7a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -710,7 +710,7 @@ LDADD = \ $(COMPAT_LIB) \ $(XTRA_LIBS) -include $(srcdir)/tests/Stub.list +include $(srcdir)/tests/Stub.am EXTRA_DIST = \ cf_gen_defines \ diff --git a/src/tests/Stub.list b/src/tests/Stub.am similarity index 100% rename from src/tests/Stub.list rename to src/tests/Stub.am