summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2016-11-13 15:43:03 -0800
committerPhilip Chimento <philip.chimento@gmail.com>2016-11-13 22:00:22 -0800
commite6c481786b8d565b3d928c8a70fdc6cb82d3bf99 (patch)
tree2b10201580d7780efa2ae0115f6e1f1f74ef47bd /Makefile.am
parentfb955f0318c5c6537de6fb68f7809a68b3570b60 (diff)
downloadm4-common-e6c481786b8d565b3d928c8a70fdc6cb82d3bf99.tar.gz
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
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 7ae8087..019631d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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