tests: loosen/tighten the always_defined_macros check
authorJim Meyering <meyering@redhat.com>
Sun, 9 May 2010 16:29:22 +0000 (18:29 +0200)
committerJim Meyering <meyering@redhat.com>
Sun, 9 May 2010 16:29:22 +0000 (18:29 +0200)
* cfg.mk (.re-defmac): Generate better regexps: allow white space
before the '#', and append a word-boundary requirement.
Without the latter, #define NULL_DEV ... would evoke a false-positive.

cfg.mk

diff --git a/cfg.mk b/cfg.mk
index 6153f53..d417461 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -128,7 +128,7 @@ gl_extract_significant_defines_ = \
          done;                                                         \
        ) | sort -u                                                     \
          | grep -Ev '^ATTRIBUTE_NORETURN'                              \
-         | sed 's/^/^# *define /'                                      \
+         | sed 's/^/^ *# *define /;s/$$/\\>/'                          \
          > $@-t
        @mv $@-t $@