X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=Makefile.inc;h=aa01812cf7e657818cd3b060b17d25fef09da4e0;hb=613b373ecea9c382ed14cfc091e3f92627de631b;hp=a8e17c75fc46f4b0a44b05296e7448c6b214cbdb;hpb=d16249bdb641672de45a578543f962e9e8fb25f0;p=gedcom-parse.git diff --git a/Makefile.inc b/Makefile.inc index a8e17c7..aa01812 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -12,12 +12,14 @@ define replace-VERSION endef %.tabgen.h: %.tab.h - if [ ! -r $@ ] ; \ + if [ ! -r $(srcdir)/$@ ] ; \ then \ - touch $@; \ + touch $(srcdir)/$@; \ fi - if ! diff -q $< $@ > /dev/null; \ + if diff $< $(srcdir)/$@ > /dev/null 2>&1; \ then \ - rm $@; \ - cp $< $@; \ + : ; \ + else \ + rm $(srcdir)/$@; \ + cp $(srcdir)/$< $(srcdir)/$@; \ fi