diff --git a/Makefile b/Makefile index 811abbe0..5d036a5e 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ export PATH := $(CURDIR)/bin:$(PATH) # recursive make considered useful for m-p MAKE += -r --no-print-directory -DIRECT_TARGETS := help help/distro help/ve help/vm clean distclean check +export DIRECT_TARGETS := help help/distro help/ve help/vm clean distclean check .PHONY: $(DIRECT_TARGETS) # these build nothing so no use of reports either diff --git a/lib/profile.mk b/lib/profile.mk index f01e8f30..feaae61e 100644 --- a/lib/profile.mk +++ b/lib/profile.mk @@ -2,6 +2,7 @@ ifndef MKIMAGE_PROFILES $(error this makefile is designed to be included in toplevel one) endif +ifneq (,$(filter-out $(DIRECT_TARGETS),$(MAKECMDGOALS))) # this could have come from env; or could be symlinked; or is made anew # (the reuse rationale is avoiding extra tmpdir lookups) # NB: immediate assignment matters @@ -20,6 +21,7 @@ endif ifeq (,$(BUILDDIR)) $(error suitable BUILDDIR unavailable) endif +endif # even smart caching only hurts when every build goes from scratch NO_CACHE ?= 1