Generated for release 0.17.
[gedcom-parse.git] / Makefile.inc
index f86ad01d7b2867f6d5869c446567a5b52557c61a..dd724ba3fe1cf22ac74d16056f580cb6f11fadc0 100644 (file)
@@ -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