X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=Makefile.inc;h=a9d0c878f5fac0f940ac283be1f475a9f90c4624;hb=51bf608f680c4c2736144ecf9e3c21121ebbef9e;hp=f86ad01d7b2867f6d5869c446567a5b52557c61a;hpb=33ba39ee5fcff8327cb2a14b8826eb22a40c3be2;p=gedcom-parse.git diff --git a/Makefile.inc b/Makefile.inc index f86ad01..a9d0c87 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,18 @@ define replace-VERSION 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