Makefile: Create a report directory at each iteration
Also now there will be no garbage (temporary directories) when executing DIRECT_TARGETS.
This commit is contained in:
parent
6777e4ed2d
commit
4f1110f796
14
Makefile
14
Makefile
@ -19,12 +19,6 @@ export ARCHES ARCH
|
||||
|
||||
export PATH := $(CURDIR)/bin:$(PATH)
|
||||
|
||||
# supervise target tracing; leave stderr alone
|
||||
ifdef REPORT
|
||||
export REPORT_PATH := $(shell mktemp --tmpdir mkimage-profiles.report.XXXXXXX)
|
||||
POSTPROC := | report-filter > $(REPORT_PATH)
|
||||
endif
|
||||
|
||||
# recursive make considered useful for m-p
|
||||
MAKE += -r --no-print-directory
|
||||
|
||||
@ -62,12 +56,12 @@ SHELL = /bin/bash
|
||||
fi; \
|
||||
say "** ARCH: $$ARCH"; \
|
||||
fi; \
|
||||
if $(MAKE) -f main.mk ARCH=$$ARCH $@ $(POSTPROC); then \
|
||||
if [ -n "$(REPORT)" ]; then \
|
||||
$(MAKE) -f reports.mk ARCH=$$ARCH REPORT=$(REPORT); \
|
||||
fi; \
|
||||
REPORT_PATH=$$(mktemp --tmpdir mkimage-profiles.report.XXXXXXX); \
|
||||
$(MAKE) -f main.mk ARCH=$$ARCH $@ | report-filter > $$REPORT_PATH || exit 1; \
|
||||
$(MAKE) -f reports.mk ARCH=$$ARCH REPORT=$(REPORT) REPORT_PATH=$$REPORT_PATH; \
|
||||
else \
|
||||
exit 1; \
|
||||
$(MAKE) -f main.mk ARCH=$$ARCH $@ || exit 1; \
|
||||
fi; \
|
||||
if [ -n "$(AUTOCLEAN)" ]; then $(MAKE) distclean; fi; \
|
||||
done; \
|
||||
|
Loading…
Reference in New Issue
Block a user