bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] maint.mk: also prohibit lower-case @var@


From: Jim Meyering
Subject: Re: [PATCH] maint.mk: also prohibit lower-case @var@
Date: Fri, 03 Feb 2012 08:27:05 +0100

Eric Blake wrote:
> * top/maint.mk (sc_makefile_at_at_check): Enhance check to cover
> lower case, like @address@hidden
>
> Signed-off-by: Eric Blake <address@hidden>
> ---
>
> Any objections to this?  I noticed that libvirt had a mix
> of $(top_srcdir) and @top_srcdir@ in the same variable, and
> traced it to a weak syntax check not catching the difference.

No objection.  I vaguely recall deliberately omitting lower case
variables (maybe even for libvirt), to make the check less invasive.

But please adjust it to use /.../i instead of adding a-z.
Better still, just use \w+ instead of the explicit [...]+.

>  ChangeLog    |    6 ++++++
>  top/maint.mk |    4 ++--
>  2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index 9c5a3cd..c8a8a99 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,9 @@
> +2012-02-02  Eric Blake  <address@hidden>
> +
> +     maint.mk: also prohibit lower-case @var@
> +     * top/maint.mk (sc_makefile_at_at_check): Enhance check to cover
> +     lower case, like @address@hidden
> +
>  2012-02-02  Jim Meyering  <address@hidden>
>
>       file-has-acl: suppress a warning from gcc -Wsuggest-attribute=const
> diff --git a/top/maint.mk b/top/maint.mk
> index be7ba49..b21e884 100644
> --- a/top/maint.mk
> +++ b/top/maint.mk
> @@ -1015,8 +1015,8 @@ update-NEWS-hash: NEWS
>  # setting this to ' && !/PRAGMA_SYSTEM_HEADER/'.
>  _makefile_at_at_check_exceptions ?=
>  sc_makefile_at_at_check:
> -     @perl -ne '/address@hidden@/'                                   \
> -          -e ' && !/([A-Z_0-9]+)address@hidden@$$/'                  \
> +     @perl -ne '/address@hidden@/'                                   \
> +          -e ' && !/([A-Za-z_0-9]+)address@hidden@$$/'                       
> \
>            -e ''$(_makefile_at_at_check_exceptions)                   \
>         -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}'    \
>           $$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]