diff options
author | Mike Gerwitz <mike.gerwitz@ryansg.com> | 2021-02-22 12:37:38 -0500 |
---|---|---|
committer | Mike Gerwitz <mike.gerwitz@ryansg.com> | 2021-02-23 10:41:20 -0500 |
commit | 698ddcdd06429598acda08300a7a86a32ececa57 (patch) | |
tree | c91e898b36237d3ef8f0b8cad83fed9b579911ba /build-aux | |
parent | 3b1b894dab7ff08f3cf00a97a7bc1a47ccfab80e (diff) | |
download | tame-698ddcdd06429598acda08300a7a86a32ececa57.tar.gz tame-698ddcdd06429598acda08300a7a86a32ececa57.tar.bz2 tame-698ddcdd06429598acda08300a7a86a32ececa57.zip |
build-aux/Makefile.am (.version.xml): Only change timestamp on hash change
The timestamp of the file will now only be updated if the hash (version)
_actually_ changes. This allows this to be used as a target dependency
without forcing a rebuild each and every time.
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/Makefile.am | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/build-aux/Makefile.am b/build-aux/Makefile.am index a0f0be1..5482c3f 100644 --- a/build-aux/Makefile.am +++ b/build-aux/Makefile.am @@ -190,9 +190,14 @@ c1map: $(dest_c1map) %.xml: %.csvo rater/core/vector/table.xmlo rater/tools/csv2xml $< > $@ +# This target is always run, but only update the file (and thus its +# timestamp) if the hash actually changes, so that we do not rebuild any +# dependencies unnecessarily. version: .version.xml .version.xml: FORCE - git log HEAD^.. -1 --pretty=format:'<version>%h</version>' > .version.xml + git log HEAD^.. -1 --pretty=format:'<version>%h</version>' > $@.new + cmp $@ $@.new || mv $@.new $@ + $(RM) $@.new ui/program.expanded.xml: ui/program.xml $(program_fragments) $(TAME_TS) |