From 053f36447262573959c69602b88e6265fce5e3a4 Mon Sep 17 00:00:00 2001 From: Anton Midyukov Date: Mon, 7 Oct 2024 17:16:53 +0300 Subject: [PATCH] Enable report unconditionally, when REPORT is set Note: when CHECK is set, targets.log only. targets.log will be moved to $(BUILDDIR)/reports/ --- Makefile | 7 ++++--- lib/report.mk | 4 ---- reports.mk | 4 ++++ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 7ffae296..ce2c5b71 100644 --- a/Makefile +++ b/Makefile @@ -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; \ diff --git a/lib/report.mk b/lib/report.mk index 5e52550f..7785ce5a 100644 --- a/lib/report.mk +++ b/lib/report.mk @@ -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 diff --git a/reports.mk b/reports.mk index 4cc88b83..92a7a2a5 100644 --- a/reports.mk +++ b/reports.mk @@ -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)"