Commit 053f3644 authored by Anton Midyukov's avatar Anton Midyukov

Enable report unconditionally, when REPORT is set

Note: when CHECK is set, targets.log only. targets.log will be moved to $(BUILDDIR)/reports/
parent 1a308d77
......@@ -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; \
......
# 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
......@@ -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)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment