From: Eric Blake Date: Fri, 30 Mar 2012 02:47:55 +0000 (-0600) Subject: maint.mk: fix syntax checks without exclusions X-Git-Tag: v0.1~800 X-Git-Url: http://erislabs.net/gitweb/?p=gnulib.git;a=commitdiff_plain;h=3d0ba3fe7865e7030b4d2097f122e64b16f0a5c9 maint.mk: fix syntax checks without exclusions Commit 727075d0 skipped per-line exclusions if ${exclude} is left undefined, but was immediately broken by commit 44de969c which always initialized the variable to the empty string. * top/maint.mk (_sc_search_regexp): Allow for empty variable. Reported by Daniel P. Berrange. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 376a5a29c..58c4c6d21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2012-03-29 Eric Blake + maint.mk: fix syntax checks without exclusions + * top/maint.mk (_sc_search_regexp): Allow for empty variable. + Reported by Daniel P. Berrange. + strerror_r: avoid compiler warning * lib/strerror_r.c (strerror_r): Hoist extern declaration to top level. diff --git a/top/maint.mk b/top/maint.mk index 951b3586f..2228a378b 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -279,7 +279,7 @@ define _sc_search_regexp if test -n "$$files"; then \ if test -n "$$prohibit"; then \ grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \ - | grep -vE "$${exclude-^$$}" \ + | grep -vE "$${exclude:-^$$}" \ && { msg="$$halt" $(_sc_say_and_exit) } || :; \ else \ grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \