# HG changeset patch # User Jim Meyering # Date 1303719860 -7200 # Node ID 268395c9bfdfbfc8516102a28fc4d0d56d645fbd # Parent b427a19383363b44d4ce7b0c625aa225b650be25 maint.mk: makefile_at_at_check extend and clean up * top/maint.mk (sc_makefile_at_at_check): Check *.mk files in addition to */Makefile.am. Exempt legitimate uses of @VAR@ notation, e.g., MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@ Remove obsolete coreutils-specific comment. Prompted by discussion here: http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/26074 diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-04-25 Jim Meyering + + maint.mk: makefile_at_at_check extend and clean up + * top/maint.mk (sc_makefile_at_at_check): Check *.mk files + in addition to */Makefile.am. + Exempt legitimate uses of @VAR@ notation, e.g., + MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@ + Remove obsolete coreutils-specific comment. + Prompted by discussion here: + http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/26074 + 2011-04-24 Paul Eggert strtoul: remove dependency on strtol diff --git a/top/maint.mk b/top/maint.mk --- a/top/maint.mk +++ b/top/maint.mk @@ -942,16 +942,23 @@ # Ensure that we use only the standard $(VAR) notation, # not @...@ in Makefile.am, now that we can rely on automake # to emit a definition for each substituted variable. -# We use perl rather than "grep -nE ..." to exempt a single -# use of an @...@-delimited variable name in src/Makefile.am. +# However, there is still one case in which @VAR@ use is not just +# legitimate, but actually required: when augmenting an automake-defined +# variable with a prefix. For example, gettext uses this: +# MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@ +# otherwise, makeinfo would put German or French (current locale) +# navigation hints in the otherwise-English documentation. +# # Allow the package to add exceptions via a hook in cfg.mk; # for example, @PRAGMA_SYSTEM_HEADER@ can be permitted by # setting this to ' && !/PRAGMA_SYSTEM_HEADER/'. _makefile_at_at_check_exceptions ?= sc_makefile_at_at_check: - @perl -ne '/\@[A-Z_0-9]+\@/'$(_makefile_at_at_check_exceptions) \ + @perl -ne '/\@[A-Z_0-9]+\@/' \ + -e ' && !/([A-Z_0-9]+)\s+=.*\@\1\@$$/' \ + -e ''$(_makefile_at_at_check_exceptions) \ -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \ - $$($(VC_LIST_EXCEPT) | grep -E '(^|/)Makefile\.am$$') \ + $$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \ && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || : news-check: NEWS