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. Signed-off-by: Eric Blake <ebl...@redhat.com> --- Previously, I said > cfg.mk is included _before_ maint.mk. Therefore, $_sc_search_regexp) is > expanded in cfg.mk prior to the place where maint.mk provides a default > definition for $(exclude), so we are getting the wrong thing expanded, > which breaks the syntax check rule in cfg.mk. It turned out to be a lot simpler than that - a single character bug. ChangeLog | 3 +++ top/maint.mk | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 376a5a2..6f82644 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2012-03-29 Eric Blake <ebl...@redhat.com> + maint.mk: fix syntax checks without exclusions + * top/maint.mk (_sc_search_regexp): Allow for empty variable. + 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 951b358..2228a37 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 \ -- 1.7.7.6