From c692da6a06b9f2ad090776647dacae902aa2b23e Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Mon, 23 Apr 2012 20:45:32 +0300 Subject: [PATCH] reports.mk: cosmetic tweaks REPORT_PATH comes from a makefile; let's use corresponding notation. --- reports.mk | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/reports.mk b/reports.mk index 2899081b..08c07d6b 100644 --- a/reports.mk +++ b/reports.mk @@ -2,16 +2,14 @@ ifneq (,$(REPORT)) -BUILDDIR := $(shell sed -n 's/^.* BUILDDIR = \(.*\)/\1/p' "$$REPORT_PATH") +BUILDDIR := $(shell sed -n 's/^.* BUILDDIR = \(.*\)/\1/p' "$(REPORT_PATH)") include lib/common.mk + all: reports/targets reports/scripts reports/prep: - @if ! [ -n "$$REPORT_PATH" -a -s "$$REPORT_PATH" ]; then \ - exit 0; \ - fi; \ - mkdir -p "$(BUILDDIR)/reports/" + @mkdir -p "$(BUILDDIR)/reports/" reports/scripts: reports/prep @grep "^mki.*scripts: Run: " $(BUILDDIR)/$(BUILD_LOG) \ @@ -20,19 +18,21 @@ reports/scripts: reports/prep && echo "** scripts report: $(BUILDDIR)/$@.log" $(SHORTEN) reports/targets: reports/prep - @if [ ! -s "$$REPORT_PATH" ]; then exit 0; fi; \ + @if ! [ -n "$(REPORT_PATH)" -a -s "$(REPORT_PATH)" ]; then \ + exit 0; \ + fi; \ if type -t dot >&/dev/null; then \ REPORT_IMAGE="$(BUILDDIR)/$@.png"; \ - report-targets < "$$REPORT_PATH" \ + report-targets < "$(REPORT_PATH)" \ | dot -Tpng -o "$$REPORT_IMAGE" \ && echo "** target graph report: $$REPORT_IMAGE"; \ else \ REPORT_DOT="$(BUILDDIR)/targets.dot"; \ - report-targets < "$$REPORT_PATH" > "$$REPORT_DOT" \ + report-targets < "$(REPORT_PATH)" > "$$REPORT_DOT" \ && echo "** graphviz missing, " \ "target graph dot file: $$REPORT_DOT"; \ fi $(SHORTEN); \ - mv "$$REPORT_PATH" "$(BUILDDIR)/$@.log" + mv "$(REPORT_PATH)" "$(BUILDDIR)/$@.log" else all:; @: