-## File to include in other Makefile's, defining common commands
+## File to include in other Makefile's, defining common commands and rules
# $Id$
# $Name$
mv $$file.new $$file; \
done
endef
+
+%.tabgen.h: %.tab.h
+ @if [ ! -r $(srcdir)/$@ ] ; \
+ then \
+ echo "Creating empty file for $@"; \
+ touch $(srcdir)/$@; \
+ fi
+ @if diff $< $(srcdir)/$@ > /dev/null 2>&1; \
+ then \
+ : ; \
+ else \
+ echo "Updating $@"; \
+ rm $(srcdir)/$@; \
+ cp $(srcdir)/$< $(srcdir)/$@; \
+ fi