From 8a0d9617d2b9741c25fb1ed20b96b054bd3254a3 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Wed, 16 Jun 2010 12:29:10 +0000 Subject: [PATCH] Make the "show" target work anywhere in the build tree --- SUBMAKEHELP | 4 ++++ mk/sub-makefile.mk | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/SUBMAKEHELP b/SUBMAKEHELP index e680ef2..e109d89 100644 --- a/SUBMAKEHELP +++ b/SUBMAKEHELP @@ -22,6 +22,10 @@ Make documentation in this directory (if any) + make show VALUE=var + + Show the value of $(var) + make Bring a particular file up to date, e.g. make dist/build/Module.o diff --git a/mk/sub-makefile.mk b/mk/sub-makefile.mk index caeefa6..b69122d 100644 --- a/mk/sub-makefile.mk +++ b/mk/sub-makefile.mk @@ -36,13 +36,17 @@ endif .NOTPARALLEL: STD_TARGETS = all clean distclean maintainer_clean install html ps pdf +DIRECTORY_INDEPENDENT_TARGETS = show # The + tells make that we're recursively invoking make, otherwise 'make -j2' # goes wrong. $(STD_TARGETS): +$(TOPMAKE) $@_$(dir) $(EXTRA_MAKE_OPTS) -OTHERTARGETS=$(filter-out fast help $(STD_TARGETS) $(SPEC_TARGETS),$(MAKECMDGOALS)) +$(DIRECTORY_INDEPENDENT_TARGETS): + +$(TOPMAKE) $@ $(EXTRA_MAKE_OPTS) + +OTHERTARGETS=$(filter-out fast help show $(STD_TARGETS) $(SPEC_TARGETS),$(MAKECMDGOALS)) .PHONY: $(OTHERTARGETS) $(OTHERTARGETS): +$(TOPMAKE) $(dir)/$@ $(EXTRA_MAKE_OPTS) -- 1.7.10.4