According to Bruno Haible on 1/7/2010 2:27 PM: > Eric Blake wrote: >> This syntax is necessary, though. PRAGMA_SYSTEM_HEADER is currently either >> empty, or equal to '#pragma GCC system_header' ... > > Another case where @IDENTIFIER@ has to be used instead of $(IDENTIFIER) is for > identifiers that are passed to AM_SUBST_NOTMAKE. AM_SUBST_NOTMAKE has been > added to automake for a good reason, namely for substitutions which expand to > multi-line values. > > I think the only solution is to allow some flexibility in maint.mk.
Good point. How about the following, tested with coreutils? -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net
From 993c0eb93fcbda904f17e29b91aa7a18cf2a92bd Mon Sep 17 00:00:00 2001 From: Eric Blake <e...@byu.net> Date: Thu, 7 Jan 2010 16:25:45 -0700 Subject: [PATCH] maint.mk: allow packages to add sc_makefile_check exceptions Rather than hard-coding a coreutils-specific exception, this allows a package to specify its own exceptions in cfg.mk. * top/maint.mk (_makefile_check_exceptions): New hook. (sc_makefile_check): Use it. Signed-off-by: Eric Blake <e...@byu.net> --- ChangeLog | 6 ++++++ top/maint.mk | 6 +++++- 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 18ca2b1..0363a5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-01-07 Eric Blake <e...@byu.net> + + maint.mk: allow packages to add sc_makefile_check exceptions + * top/maint.mk (_makefile_check_exceptions): New hook. + (sc_makefile_check): Use it. + 2010-01-07 Bruno Haible <br...@clisp.org> Fix indentation of wctype.in.h, broken since 2007-01-06. diff --git a/top/maint.mk b/top/maint.mk index d1f0ccd..42a1e81 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -580,8 +580,12 @@ update-NEWS-hash: NEWS # 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. +# 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_check_exceptions ?= sc_makefile_check: - @perl -ne '/\...@[a-z_0-9]+\@/ && !/^cu_install_program =/' \ + @perl -ne '/\...@[a-z_0-9]+\@/'$(_makefile_check_exceptions) \ -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \ $$($(VC_LIST_EXCEPT) | grep -E '(^|/)Makefile\.am$$') \ && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || : -- 1.6.4.2
From 1ee80966a935daa871baab58f30b30ddd9a87dbf Mon Sep 17 00:00:00 2001 From: Eric Blake <e...@byu.net> Date: Thu, 7 Jan 2010 22:15:14 -0700 Subject: [PATCH] maint: move coreutils specific rule into cfg.mk * cfg.mk (_makefile_check_excpetions): New rule, needed for latest gnulib maint.mk change to sc_makefile_check. --- cfg.mk | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/cfg.mk b/cfg.mk index d465933..4cea0d1 100644 --- a/cfg.mk +++ b/cfg.mk @@ -28,6 +28,9 @@ export VERBOSE = yes old_NEWS_hash = beab130e9d41bf8014a0594cfe8b28d4 +# Add an exemption for sc_makefile_check. +_makefile_check_exceptions = ' && !/^cu_install_program =/' + # Ensure that the list of O_ symbols used to compute O_FULLBLOCK is complete. dd = $(srcdir)/src/dd.c sc_dd_O_FLAGS: -- 1.6.4.2
signature.asc
Description: OpenPGP digital signature