maint.mk: allow packages to add makefile @@ exceptions
authorEric Blake <ebb9@byu.net>
Thu, 7 Jan 2010 23:25:45 +0000 (16:25 -0700)
committerEric Blake <ebb9@byu.net>
Fri, 8 Jan 2010 16:26:23 +0000 (09:26 -0700)
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 <ebb9@byu.net>
ChangeLog
top/maint.mk

index dc7776e..b1d9a6a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-01-08  Eric Blake  <ebb9@byu.net>
 
+       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.
index d1f0ccd..3cd1a93 100644 (file)
@@ -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; } || :