* top/maint.mk (def_sym_regex): Handle #undef as well as #define.
Allow more than one space before the symbol name.
(sc_prohibit_always-defined_macros): Use grep's -E, now that
the regexp uses alternation.
+2010-05-27 Jim Meyering <meyering@redhat.com>
+
+ maint.mk: also prohibit "#undef" of always-defined symbols
+ * top/maint.mk (def_sym_regex): Handle #undef as well as #define.
+ Allow more than one space before the symbol name.
+ (sc_prohibit_always-defined_macros): Use grep's -E, now that
+ the regexp uses alternation.
+
2010-05-26 Eric Blake <eblake@redhat.com>
maint.mk: avoid echo -e
perl -lne '$(gl_extract_significant_defines_)' $$f; \
done; \
) | sort -u \
- | sed 's/^/^ *# *define /;s/$$/\\>/'
+ | grep -Ev '^ATTRIBUTE_NORETURN' \
+ | sed 's/^/^ *# *(define|undef) */;s/$$/\\>/'
endef
# Don't define macros that we already get from gnulib header files.
case $$(echo all: | grep -l -f - Makefile) in Makefile);; *) \
echo '$(ME): skipping $@: you lack GNU grep' 1>&2; exit 0;; \
esac; \
- $(def_sym_regex) | grep -f - $$($(VC_LIST_EXCEPT)) \
+ $(def_sym_regex) | grep -E -f - $$($(VC_LIST_EXCEPT)) \
&& { echo '$(ME): define the above via some gnulib .h file' \
1>&2; exit 1; } || :; \
fi