From d16249bdb641672de45a578543f962e9e8fb25f0 Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Fri, 16 Aug 2002 16:07:07 +0000 Subject: [PATCH] Added rule that can be used to avoid unnecessary recompilation of lex files. --- Makefile.inc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile.inc b/Makefile.inc index f86ad01..a8e17c7 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -1,4 +1,4 @@ -## File to include in other Makefile's, defining common commands +## File to include in other Makefile's, defining common commands and rules # $Id$ # $Name$ @@ -10,3 +10,14 @@ define replace-VERSION mv $$file.new $$file; \ done endef + +%.tabgen.h: %.tab.h + if [ ! -r $@ ] ; \ + then \ + touch $@; \ + fi + if ! diff -q $< $@ > /dev/null; \ + then \ + rm $@; \ + cp $< $@; \ + fi -- 2.30.2