# HG changeset patch # User Eric Blake # Date 1262906745 25200 # Node ID 47c45341eca0b467c5319fc29dae1583cbff09d1 # Parent c7910f932a31352ac2807cb3760cc5837d0c0ec1 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 --- 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 --- a/top/maint.mk +++ b/top/maint.mk @@ -580,8 +580,12 @@ # 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; } || :