From: Eric Blake Date: Thu, 7 Jan 2010 23:25:45 +0000 (-0700) Subject: maint.mk: allow packages to add makefile @@ exceptions X-Git-Tag: v0.1~4881 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=c535f4489b41f28afd115ae331d69595ea41b6a1;p=gnulib.git maint.mk: allow packages to add makefile @@ 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_at_at_check_exceptions): New hook. (sc_makefile_check): Rename... (sc_makefile_at_at_check): ...to this, and use hook. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index dc7776eab..b1d9a6a79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-01-08 Eric Blake + maint.mk: allow packages to add makefile @@ exceptions + * top/maint.mk (_makefile_at_at_check_exceptions): New hook. + (sc_makefile_check): Rename... + (sc_makefile_at_at_check): ...to this, and use hook. + dup2: work around mingw bug * lib/dup2.c (rpl_dup2): Sanitize return value on mingw. Reported by Simon Josefsson. diff --git a/top/maint.mk b/top/maint.mk index d1f0ccd07..3cd1a93bf 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. -sc_makefile_check: - @perl -ne '/\@[A-Z_0-9]+\@/ && !/^cu_install_program =/' \ +# 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) \ -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \ $$($(VC_LIST_EXCEPT) | grep -E '(^|/)Makefile\.am$$') \ && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :