788cad885e
The purpose is being able to examine particular target interdependency graph for a given image having been configured to avoid convoluted dependencies (loops in particular). The implementation is based on SHELL hook hint by John Graham-Cumming: http://cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
15 lines
426 B
Makefile
15 lines
426 B
Makefile
# collect what's left
|
|
|
|
all: reports/targets
|
|
|
|
reports/targets:
|
|
@if [ -n "$$REPORT_PATH" -a -s "$$REPORT_PATH" ]; then \
|
|
BUILDDIR="`sed -n 's/^.* BUILDDIR = \(.*\)/\1/p' \
|
|
"$$REPORT_PATH"`"; \
|
|
REPORT_IMAGE="$$BUILDDIR/targets.png"; \
|
|
bin/report-targets < "$$REPORT_PATH" \
|
|
| dot -Tpng -o "$$REPORT_IMAGE" \
|
|
&& echo "** target graph report: $$REPORT_IMAGE" \
|
|
&& mv "$$REPORT_PATH" "$$BUILDDIR/targets.log"; \
|
|
fi
|