maint.mk: fix syntax checks without exclusions
authorEric Blake <eblake@redhat.com>
Fri, 30 Mar 2012 02:47:55 +0000 (20:47 -0600)
committerIan Beckwith <ianb@erislabs.net>
Sun, 1 Apr 2012 21:14:00 +0000 (22:14 +0100)
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 <eblake@redhat.com>
(cherry picked from commit 3d0ba3fe7865e7030b4d2097f122e64b16f0a5c9)

ChangeLog
NEWS.stable
top/maint.mk

index e2209ed..f110aa5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
-<<<<<<< HEAD
-=======
+2012-03-29  Eric Blake  <eblake@redhat.com>
+
+       maint.mk: fix syntax checks without exclusions
+       * top/maint.mk (_sc_search_regexp): Allow for empty variable.
+       Reported by Daniel P. Berrange.
+
 2012-03-24  Bruno Haible  <bruno@clisp.org>
 
        gnulib-tool: Avoid unintended error output from 'cmp'.
index a185f33..efadc10 100644 (file)
@@ -11,6 +11,7 @@ Date:   Sat Mar 24 16:41:21 2012 +0100
 with the following additional commits:
 
     * [7ce7d6b]->[c07add3] autoupdate
+    * [3d0ba3f]->[] maint.mk: fix syntax checks without exclusions
 __NEXTCOMMITMARKER__
 
 ----------------------------------------------------------------------
index 951b358..2228a37 100644 (file)
@@ -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 \