summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorNicolas Williams <nico@cryptonector.com>2015-02-15 17:57:53 -0600
committerNicolas Williams <nico@cryptonector.com>2015-02-15 18:34:44 -0600
commit8cef5a37ab9d53ee81500b93f44e410c7814a512 (patch)
treebc4cd1706f10ec47acba98565b9399e92796a93e /Makefile.am
parent8afdeee785140f3f916321f2a24b4c02d99131ee (diff)
Add --disable-maintainer-mode; make bison optional
Also flex is now optional. The outputs of flex and bison are now committed. By default they get built, but users who want to build from git can now ./configure --disable-maintainer-mode to turn off the dependency on bison and flex. Maintainers must, of course, commit the bison and/or flex outputs when they make changes to parser.y and/or lexer.l, respectively.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 9b9cc5e0..4a14304f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,10 +20,18 @@ ACLOCAL_AMFLAGS = -I config/m4
# While there is some autoconf macro support for lex/flex, it doesn't support
# header file creation so we'll use good old make
+if MAINTAINER_MODE
BUILT_SOURCES = lexer.h lexer.c parser.h parser.c version.h
lexer.c: lexer.l
$(AM_V_LEX) flex -o lexer.c --header-file=lexer.h $<
lexer.h: lexer.c
+else
+BUILT_SOURCES =
+.y.c:
+ $(AM_V_YACC) echo "NOT building parser.c!"
+.l.c:
+ $(AM_V_LEX) echo "NOT building lexer.c!"
+endif
# Tell YACC (bison) autoconf macros that you want a header file created.
# If the --warnings=all fails, you probably have an old version of bison