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.
master
Mike Gerwitz 2021-02-22 12:37:38 -05:00
parent 3b1b894dab
commit 698ddcdd06
2 changed files with 18 additions and 1 deletions

View File

@ -13,6 +13,18 @@ TAME developers: Add new changes under a "NEXT" heading as part of the
commits that introduce the changes. To make a new release, run
`tools/mkrelease`, which will handle updating the heading for you.
NEXT
====
This release contains changes to the build system to accommodate
liza-proguic's introduction of step-based packages (in place of a monolithic
`package-dfns.xml`), as well as miscellaneous improvements.
Build System
------------
- Only modify `.version.xml` timestamp when hash changes. This allows
its use as a dependency without forcefully rebuilding each and every time.
v17.7.0 (2020-12-09)
====================
This release provides tail-call optimizations aimed at the query system in

View File

@ -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)