[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: maint.mk vs. PRAGMA_SYSTEM_HEADER
From: |
Jim Meyering |
Subject: |
Re: maint.mk vs. PRAGMA_SYSTEM_HEADER |
Date: |
Fri, 08 Jan 2010 14:22:16 +0100 |
Eric Blake wrote:
> 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?
...
> 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.
...
> +# 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; } || :
...
> 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.
...
> +# Add an exemption for sc_makefile_check.
> +_makefile_check_exceptions = ' && !/^cu_install_program =/'
Both look fine. Thanks!
I did feel a little guilty back when I moved that rule with its
coreutils-specific exception into gnulib ;-)
While you're there, you might want to rename the rule to
something more descriptive, like sc_makefile_at_at_check.