Enable report unconditionally, when REPORT is set

Note: when CHECK is set, targets.log only.
targets.log will be moved to $(BUILDDIR)/reports/
This commit is contained in:
Anton Midyukov 2024-10-07 17:16:53 +03:00
parent 1a308d7745
commit 053f364472
3 changed files with 8 additions and 7 deletions

View File

@ -3,9 +3,10 @@
# collect proceedings
ifeq (,$(CHECK))
ifeq (,$(DEBUG))
ifneq (,$(REPORT))
$(warning REPORT is disabled, DEBUG must be enabled for this)
ifeq (,$(DEBUG))
export DEBUG=1
$(warning DEBUG is enabled, since REPORT is enabled)
endif
endif
endif
@ -76,7 +77,7 @@ SHELL = /bin/bash
fi; \
say "** BRANCH/ARCH: $(BRANCH)/$$ARCH"; \
fi; \
if [ -n "$(REPORT)" ] && [ -n "$(DEBUG)" ] && [ -z "$(CHECK)" ]; then \
if [ -n "$(REPORT)" ]; then \
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; \

View File

@ -1,7 +1,5 @@
# enable make target tracing
ifeq (,$(CHECK))
ifneq (,$(DEBUG))
ifneq (,$(REPORT))
TRACE_PREFIX := trace:building
OLD_SHELL := $(SHELL)
@ -9,5 +7,3 @@ SHELL = $(info $(TRACE_PREFIX) $@$(if $^$|, -> $^ $|))$(OLD_SHELL)
# piggyback BUILDDIR back into supervising environment
$(info $(TRACE_PREFIX) BUILDDIR = $(BUILDDIR))
endif
endif
endif

View File

@ -30,6 +30,7 @@ define report_body
fi; }
endef
ifeq (,$(CHECK))
all: reports/targets reports/scripts reports/cleanlog \
reports/contents reports/packages
@rm -fr "$(LOGDIR)/$(IMAGE_OUTFILE).reports"
@ -43,6 +44,9 @@ ifeq (2,$(REPORT))
@cd "$(LOGDIR)" && tar -cf "$(IMAGE_OUTFILE).reports.tar" "$(IMAGE_OUTFILE).reports" && \
rm -r "$(IMAGE_OUTFILE).reports"
endif
else
all: reports/targets; @:
endif
reports/prep:
@mkdir -p "$(REPORTDIR)" "$(LOGDIR)"