On 03/28/2010 08:54 AM, Jose E. Marchesi wrote:
> 
>>From 24ab183f237468f2aa59d2424dc416f61c183671 Mon Sep 17 00:00:00 2001
> From: Jose E. Marchesi <jema...@gnu.org>
> Date: Sun, 28 Mar 2010 15:42:03 +0200
> Subject: [PATCH 3/3] Macro _prohibit_regexp replaced by _sc_search_regep and 
> rules adapted to use the new macro.

Typo (s/regep/regexp/).  Also, that's an awfully long subject, which
later shows up in 'git log --oneline'.  I would trim it to something
like the following (one line summary, then further details separated by
a blank line):

maint: replace _prohibit_regexp with _sc_search_regexp

All existing rules are adapted to use the new factorization, which
provides a more declarative syntax for pattern searching syntax checks.

>  # Don't use Texinfo @acronym{} as it is not a good idea.
>  sc_texinfo_acronym:
> -     @if $(VC_LIST_EXCEPT) | grep -lE '\.texi$$' >/dev/null; then    \
> -             grep -nE '@acronym{'                                    \
> -                     $$($(VC_LIST_EXCEPT) | grep -E '\.texi$$') &&   \
> -       { echo '$(ME): found use of Texinfo @acronym{}' 1>&2;         \
> -         exit 1; } || :;                                             \
> -     else :;                                                         \
> -     fi
> +     @prohibit='@acronym{'                                           \
> +     in_vc_files='\.texi$$'                                          \
> +     halt='found use of Texinfo @acronym{}'                          \
> +       $(_sc_search_regexp)

Jim mentioned that this rule should also look at *.txi and *.texinfo.

>  # #if HAVE_... will evaluate to false for any non numeric string.
>  # That would be flagged by using -Wundef, however gnulib currently
>  # tests many undefined macros, and so we can't enable that option.
>  # So at least preclude common boolean strings as macro values.
>  sc_Wundef_boolean:
> -     @test -e '$(CONFIG_INCLUDE)' &&                                 \
> -        grep -Ei '^#define.*(yes|no|true|false)$$' '$(CONFIG_INCLUDE)' && \
> -          { echo 'Use 0 or 1 for macro values' 1>&2; exit 1; } || :
> +     @prohibit='^#define.*(yes|no|true|false)$$'                     \
> +     in_vc_files='$(CONFIG_INCLUDE)'                                 \
> +     halt='Use 0 or 1 for macro values'                              \
> +       $(_sc_search_regexp)

$(CONFIG_INCLUDE) is not a controlled file.  You need to use in_files
instead.

Thanks again for doing this nice factorization.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to