Commit e6c48178 authored by Philip Chimento's avatar Philip Chimento 🚮
Browse files

build: Remove dnl lines with m4 itself

Instead of a non-optimally-portable regex, use m4 itself to remove dnl
lines. Plain m4 without any autoconf extensions will remove dnl, but not
expand any of the autoconf stuff. This is because autoconf undefines all
of the built-in m4 macros and defines new ones that plain m4 is unaware
of.

https://bugzilla.gnome.org/show_bug.cgi?id=774299
parent fb955f03
......@@ -26,8 +26,9 @@ dist_aclocal_DATA = \
autoconf-archive/m4/ax_valgrind_check.m4 \
$(NULL)
# Here, plain m4 is being used to strip 'dnl' comments.
all-local: $(dist_aclocal_DATA)
cat $^ | grep -v '^#' | grep -v 'AX_PACKAGE_REQUIRES' | sed -e 's/\<dnl\>.*//' | grep -o '\<AX_[A-Z0-9_]*[A-Z0-9]\>' | sort | uniq > used
cat $^ | grep -v '^#' | grep -v 'AX_PACKAGE_REQUIRES' | m4 | grep -o '\<AX_[A-Z0-9_]*[A-Z0-9]\>' | sort | uniq > used
cat $^ | grep ^AC_DEFUN | grep -o '\<AX_[A-Z0-9_]*\>' | sort | uniq > defined
diff -u used defined
rm -f used defined
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment