X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=Makefile.inc;h=dd724ba3fe1cf22ac74d16056f580cb6f11fadc0;hb=e4ccfb6a6f26881db3874841a5aa2c2201a9c4e0;hp=f86ad01d7b2867f6d5869c446567a5b52557c61a;hpb=33ba39ee5fcff8327cb2a14b8826eb22a40c3be2;p=gedcom-parse.git diff --git a/Makefile.inc b/Makefile.inc index f86ad01..dd724ba 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 $(srcdir)/$@ ] ; \ + then \ + touch $(srcdir)/$@; \ + fi + if ! diff -q $< $(srcdir)/$@ > /dev/null; \ + then \ + rm $(srcdir)/$@; \ + cp $(srcdir)/$< $(srcdir)/$@; \ + fi