build-aux/Makefile.am: Optional timestamping

Note that, because of the way this is implemented, the timestamps may become
mangled (multiple per line) for parallel builds.

Output can be prettied up in the future.
master
Mike Gerwitz 2020-01-02 10:42:07 -05:00
parent 3cb67109ec
commit be296a241a
2 changed files with 22 additions and 3 deletions

View File

@ -99,6 +99,12 @@ export TAMED_STALL_SECONDS
TAMED_SPAWNER_PID=$(shell echo $$PPID) TAMED_SPAWNER_PID=$(shell echo $$PPID)
export TAMED_SPAWNER_PID export TAMED_SPAWNER_PID
# Optional timestamping for TAME commands
TS_FMT=%s
tame__ts_0 = :
tame__ts_1 = @printf '[%($(TS_FMT))T] '
TAME_TS = $(tame__ts_$(TS))
all: program-data-copy all: program-data-copy
# Building all common files is useful in a distributed pipeline so that # Building all common files is useful in a distributed pipeline so that
@ -107,6 +113,11 @@ common: $(xmlo_common)
program-ui: ui/package.strip.js ui/Program.js ui/html/index.phtml program-ui: ui/package.strip.js ui/Program.js ui/html/index.phtml
# Individual dependencies appear in suppliers.mk (see below)
%.xmlo: %.xml
$(TAME_TS)
$(TAME) compile $< $@
# Note the `$()' here to prevent Automake from inlining this file---it is # Note the `$()' here to prevent Automake from inlining this file---it is
# to be generated when imports change, which can be at any time. # to be generated when imports change, which can be at any time.
include $()suppliers.mk include $()suppliers.mk
@ -114,13 +125,16 @@ include $()suppliers.mk
summary-html: $(dest_summary_html) ; summary-html: $(dest_summary_html) ;
%.html: %.js %.xmle %.html: %.js %.xmle
$(TAME_TS)
$(TAME) summary $*.xmle $@ $(TAME) summary $*.xmle $@
standalones: $(dest_standalone) standalones: $(dest_standalone)
strip: $(dest_standalone_strip) ui/package.strip.js strip: $(dest_standalone_strip) ui/package.strip.js
%.xmle: %.xmlo %.xmle: %.xmlo
$(TAME_TS)
$(TAME) link $< $@ $(TAME) link $< $@
%.js: %.xmle %.js: %.xmle
$(TAME_TS)
$(TAME) standalone $< $@ $(TAME) standalone $< $@
%.strip.js: %.js %.strip.js: %.js
cp $< $@ cp $< $@
@ -130,8 +144,10 @@ strip: $(dest_standalone_strip) ui/package.strip.js
c1map: $(dest_c1map) c1map: $(dest_c1map)
%.dot: %.xmlo %.dot: %.xmlo
$(TAME_TS)
$(TAME) dot $< $@ $(TAME) dot $< $@
%.dote: %.xmle %.dote: %.xmle
$(TAME_TS)
$(TAME) dot $< $@ $(TAME) dot $< $@
%.svg: %.dote %.svg: %.dote
@ -164,16 +180,21 @@ version: .version.xml
git log HEAD^.. -1 --pretty=format:'<version>%h</version>' > .version.xml git log HEAD^.. -1 --pretty=format:'<version>%h</version>' > .version.xml
ui/program.expanded.xml: ui/program.xml $(program_fragments) ui/program.expanded.xml: ui/program.xml $(program_fragments)
$(TAME_TS)
$(TAME) progui-expand $< $@ $(TAME) progui-expand $< $@
ui/Program.js: ui/program.expanded.xml ui/package.js ui/Program.js: ui/program.expanded.xml ui/package.js
$(TAME_TS)
$(TAME) progui-class $< $@ include-path=../../../ui/ $(TAME) progui-class $< $@ include-path=../../../ui/
ui/html/index.phtml: ui/program.expanded.xml ui/html/index.phtml: ui/program.expanded.xml
$(TAME_TS)
$(TAME) progui-html $< $@ out-path=./ $(TAME) progui-html $< $@ out-path=./
ui/package-dfns.xmlo: ui/package-dfns.xml ui/package-dfns.xmlo: ui/package-dfns.xml
ui/package-dfns.xml: ui/program.expanded.xml ui/package-dfns.xml: ui/program.expanded.xml
$(TAME_TS)
$(TAME) progui-pkg $< $@ $(TAME) progui-pkg $< $@
ui/package-map.xmlo: ui/package-map.xml ui/package-dfns.xmlo ui/package-map.xmlo: ui/package-map.xml ui/package-dfns.xmlo
ui/package-map.xml: ui/program.expanded.xml ui/package-dfns.xml ui/package-map.xml: ui/program.expanded.xml ui/package-dfns.xml
$(TAME_TS)
$(TAME) progui-pkg-map $< $@ $(TAME) progui-pkg-map $< $@
# for the time being, this does not depend on clean-rate-tables because $(ant) will # for the time being, this does not depend on clean-rate-tables because $(ant) will
@ -298,6 +319,7 @@ test: check
kill-tamed: tamed-die kill-tamed: tamed-die
tamed-die: tamed-die:
$(TAME_TS)
$(TAME) --kill $(TAME) --kill
me-a-sandwich: me-a-sandwich:

View File

@ -54,9 +54,6 @@ resolv-path()
# rule for building # rule for building
[ -z "$GEN_MAKE" ] && { [ -z "$GEN_MAKE" ] && {
echo "%.xmlo: %.xml"
echo -e '\t$(TAME) compile $< $@'
export GEN_MAKE="$( pwd )/$0" export GEN_MAKE="$( pwd )/$0"
exec "$GEN_MAKE" "$@" exec "$GEN_MAKE" "$@"
} }