]> git.draconx.ca Git - cdecl99.git/commitdiff
Update timestamps on generated header files before distributing them.
authorNick Bowler <nbowler@draconx.ca>
Thu, 29 Sep 2011 00:03:35 +0000 (20:03 -0400)
committerNick Bowler <nbowler@draconx.ca>
Thu, 29 Sep 2011 00:05:59 +0000 (20:05 -0400)
Otherwise we risk breaking VPATH builds from the tarball, as make may
attempt to regenerate the headers.

Makefile.am

index 7c2099b8a9f2c5f810574bd714e9e42da4df2027..de6c066c1064f4f82418a29721f9517854f1b4b8 100644 (file)
@@ -120,6 +120,15 @@ uninstall-mo:
 src/scan.c src/scan.h: src/scan.stamp
 src/parse.c src/parse.h: src/parse.stamp
 
+# The flex/bison rules refrain from updating unchanged headers for the
+# convenience of developers, but the headers must be distributed with
+# up-to-date timestamps, otherwise make will try to update them in a fresh
+# VPATH build.
+dist-hook: update-headers
+update-headers:
+       touch -c '$(distdir)/src/scan.h'
+       touch -c '$(distdir)/src/parse.h'
+
 # Supporting rules for bison/flex.
 
 BISON_V   = $(BISON_V_$(V))