[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: maint.mk vs. PRAGMA_SYSTEM_HEADER
From: |
Eric Blake |
Subject: |
Re: maint.mk vs. PRAGMA_SYSTEM_HEADER |
Date: |
Thu, 07 Jan 2010 22:18:01 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
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 address@hidden
From 993c0eb93fcbda904f17e29b91aa7a18cf2a92bd Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
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 <address@hidden>
---
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 <address@hidden>
+
+ 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 <address@hidden>
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 @address@hidden 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 '/address@hidden@/ && !/^cu_install_program =/' \
+ @perl -ne '/address@hidden@/'$(_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 <address@hidden>
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