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
16
Makefile
16
Makefile
@ -19,12 +19,6 @@ export ARCHES ARCH
|
|||||||
|
|
||||||
export PATH := $(CURDIR)/bin:$(PATH)
|
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
|
# recursive make considered useful for m-p
|
||||||
MAKE += -r --no-print-directory
|
MAKE += -r --no-print-directory
|
||||||
|
|
||||||
@ -62,12 +56,12 @@ SHELL = /bin/bash
|
|||||||
fi; \
|
fi; \
|
||||||
say "** ARCH: $$ARCH"; \
|
say "** ARCH: $$ARCH"; \
|
||||||
fi; \
|
fi; \
|
||||||
if $(MAKE) -f main.mk ARCH=$$ARCH $@ $(POSTPROC); then \
|
if [ -n "$(REPORT)" ]; then \
|
||||||
if [ -n "$(REPORT)" ]; then \
|
REPORT_PATH=$$(mktemp --tmpdir mkimage-profiles.report.XXXXXXX); \
|
||||||
$(MAKE) -f reports.mk ARCH=$$ARCH REPORT=$(REPORT); \
|
$(MAKE) -f main.mk ARCH=$$ARCH $@ | report-filter > $$REPORT_PATH || exit 1; \
|
||||||
fi; \
|
$(MAKE) -f reports.mk ARCH=$$ARCH REPORT=$(REPORT) REPORT_PATH=$$REPORT_PATH; \
|
||||||
else \
|
else \
|
||||||
exit 1; \
|
$(MAKE) -f main.mk ARCH=$$ARCH $@ || exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
if [ -n "$(AUTOCLEAN)" ]; then $(MAKE) distclean; fi; \
|
if [ -n "$(AUTOCLEAN)" ]; then $(MAKE) distclean; fi; \
|
||||||
done; \
|
done; \
|
||||||
|
Loading…
Reference in New Issue
Block a user