]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4088] Makefile updated to easier regenerate flex/bison files.
authorTomek Mrugalski <tomasz@isc.org>
Fri, 30 Oct 2015 08:22:23 +0000 (17:22 +0900)
committerTomek Mrugalski <tomasz@isc.org>
Fri, 30 Oct 2015 13:20:12 +0000 (22:20 +0900)
src/lib/eval/Makefile.am

index a2c28afc8aeee5b4f9e46c02695607e12ce0a094..7d34bbdc8b09a8adb183d6dc250ab374ae6e2468 100644 (file)
@@ -45,9 +45,29 @@ BUILT_SOURCES = eval_messages.h eval_messages.cc
 
 CLEANFILES = eval_messages.h eval_messages.cc
 
+# If we want to get rid of all flex/bison generated files, we need to use
+# make maintainer-clean. The proper way to introduce custom commands for
+# that operation is to define maintainer-clean-local target. However,
+# make maintainer-clean also removes Makefile, so running configure script
+# is required. To make it easy to rebuild flex/bison without going through
+# reconfigure, a new target parser-clean has been added.
+maintainer-clean-local:
+       rm -f location.hh lexer.cc parser.cc parser.h position.hh stack.hh
+
+# To regenerate flex/bison files, one can do:
+#
+# make parser-clean
+# make parser
+#
+# This is needed only when the lexer.ll or parser.yy files are modified.
+# Make sure you have both flex and bison installed.
+parser-clean: maintainer-clean-local
+
+parser: lexer.cc location.hh position.hh stack.hh parser.cc parser.h
+       @echo "Flex/bison files regenerated"
 
 # --- Flex/Bison stuff below --------------------------------------------------
-parser.cc parser.h: parser.yy
+location.hh position.hh stack.hh parser.cc parser.h: parser.yy
        bison --defines=parser.h -oparser.cc parser.yy
 
 lexer.cc: lexer.ll