]> granicus.if.org Git - graphviz/commitdiff
build: Use EGREP to generate graphviz_version.h
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>
Mon, 5 Dec 2016 10:53:43 +0000 (11:53 +0100)
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>
Mon, 5 Dec 2016 10:53:43 +0000 (11:53 +0100)
According to POSIX, '|' only works as an alternation character in grep
when it is extended regular expression mode (egrep, or grep -E).

This is not an issue most of the time because GNU grep accepts it in
non-extended expressions as well, but other grep implementations
adhering to the standard will fail to match the pattern used to generate
graphviz_version.h.

Switching to EGREP (which also requires not escaping the '|'s) makes it
work for all implementations.

Makefile.am

index 09181e79eb349324d1457b10057beac7f9b1c36a..fb212b41f63d7ea352b4b890cf0bc7f1464b68e3 100644 (file)
@@ -33,7 +33,7 @@ dist-hook:
 BUILT_SOURCES = $(top_builddir)/graphviz_version.h
 
 $(top_builddir)/graphviz_version.h: config.h
-       $(GREP) 'PACKAGE\|VERSION\|GVPLUGIN' config.h > $(top_builddir)/graphviz_version.h
+       $(EGREP) 'PACKAGE|VERSION|GVPLUGIN' config.h > $(top_builddir)/graphviz_version.h
 
 EXTRA_DIST = $(txt) $(html) graphviz.spec.in graphviz.spec \
        autogen.sh config/depcomp config/config.rpath \