From: Peter Verthez Date: Fri, 16 Aug 2002 16:07:07 +0000 (+0000) Subject: Added rule that can be used to avoid unnecessary recompilation of X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=d16249bdb641672de45a578543f962e9e8fb25f0;p=gedcom-parse.git Added rule that can be used to avoid unnecessary recompilation of lex files. --- 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