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 @@ ...@@ -3,9 +3,10 @@
# collect proceedings # collect proceedings
ifeq (,$(CHECK)) ifeq (,$(CHECK))
ifeq (,$(DEBUG))
ifneq (,$(REPORT)) 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 endif
endif endif
...@@ -76,7 +77,7 @@ SHELL = /bin/bash ...@@ -76,7 +77,7 @@ SHELL = /bin/bash
fi; \ fi; \
say "** BRANCH/ARCH: $(BRANCH)/$$ARCH"; \ say "** BRANCH/ARCH: $(BRANCH)/$$ARCH"; \
fi; \ fi; \
if [ -n "$(REPORT)" ] && [ -n "$(DEBUG)" ] && [ -z "$(CHECK)" ]; then \ if [ -n "$(REPORT)" ]; then \
REPORT_PATH=$$(mktemp --tmpdir mkimage-profiles.report.XXXXXXX); \ REPORT_PATH=$$(mktemp --tmpdir mkimage-profiles.report.XXXXXXX); \
$(MAKE) -f main.mk ARCH=$$ARCH $@ | report-filter > $$REPORT_PATH || exit 1; \ $(MAKE) -f main.mk ARCH=$$ARCH $@ | report-filter > $$REPORT_PATH || exit 1; \
$(MAKE) -f reports.mk ARCH=$$ARCH REPORT=$(REPORT) REPORT_PATH=$$REPORT_PATH; \ $(MAKE) -f reports.mk ARCH=$$ARCH REPORT=$(REPORT) REPORT_PATH=$$REPORT_PATH; \
......
# enable make target tracing # enable make target tracing
ifeq (,$(CHECK))
ifneq (,$(DEBUG))
ifneq (,$(REPORT)) ifneq (,$(REPORT))
TRACE_PREFIX := trace:building TRACE_PREFIX := trace:building
OLD_SHELL := $(SHELL) OLD_SHELL := $(SHELL)
...@@ -9,5 +7,3 @@ SHELL = $(info $(TRACE_PREFIX) $@$(if $^$|, -> $^ $|))$(OLD_SHELL) ...@@ -9,5 +7,3 @@ SHELL = $(info $(TRACE_PREFIX) $@$(if $^$|, -> $^ $|))$(OLD_SHELL)
# piggyback BUILDDIR back into supervising environment # piggyback BUILDDIR back into supervising environment
$(info $(TRACE_PREFIX) BUILDDIR = $(BUILDDIR)) $(info $(TRACE_PREFIX) BUILDDIR = $(BUILDDIR))
endif endif
endif
endif
...@@ -30,6 +30,7 @@ define report_body ...@@ -30,6 +30,7 @@ define report_body
fi; } fi; }
endef endef
ifeq (,$(CHECK))
all: reports/targets reports/scripts reports/cleanlog \ all: reports/targets reports/scripts reports/cleanlog \
reports/contents reports/packages reports/contents reports/packages
@rm -fr "$(LOGDIR)/$(IMAGE_OUTFILE).reports" @rm -fr "$(LOGDIR)/$(IMAGE_OUTFILE).reports"
...@@ -43,6 +44,9 @@ ifeq (2,$(REPORT)) ...@@ -43,6 +44,9 @@ ifeq (2,$(REPORT))
@cd "$(LOGDIR)" && tar -cf "$(IMAGE_OUTFILE).reports.tar" "$(IMAGE_OUTFILE).reports" && \ @cd "$(LOGDIR)" && tar -cf "$(IMAGE_OUTFILE).reports.tar" "$(IMAGE_OUTFILE).reports" && \
rm -r "$(IMAGE_OUTFILE).reports" rm -r "$(IMAGE_OUTFILE).reports"
endif endif
else
all: reports/targets; @:
endif
reports/prep: reports/prep:
@mkdir -p "$(REPORTDIR)" "$(LOGDIR)" @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