platform.mk: Fix make -C $(TOPDIR)/make clean all
If run from $(TOPDIR), "make clean all" runs fine, because it recurses twice into $(TOPDIR)/make, once for every target. If invoked directly from $(TOPDIR)/make, it can break in two different ways: If the cache files don't exist, "make clean all" in $(TOPDIR)/make tries to create them too early as implicit make target. This leaves variables empty which should have a value. If the cache files do exist, "make clean all" in $(TOPDIR)/make includes them, cleans them, and re-creates them from the same variables just read from cache. Undesirable for cache purging. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
11ccaef832
commit
6325f9ea19
1 changed files with 2 additions and 0 deletions
|
|
@ -12,8 +12,10 @@ endef
|
|||
|
||||
CACHE_PROJECTS_MK := $(JWBDIR)/cache-projects.mk
|
||||
|
||||
ifeq ($(filter clean distclean,$(MAKECMDGOALS)),)
|
||||
$(eval $(call try_include,$(TOPDIR)/make/.cache-project.mk))
|
||||
$(eval $(call try_include,$(CACHE_PROJECTS_MK)))
|
||||
endif
|
||||
$(eval $(call try_include,$(JWBDIR)/make/pre-local.mk))
|
||||
$(eval $(call try_include,$(TOPDIR)/make/pre-local.mk))
|
||||
$(eval $(call try_include,pre-local.mk))
|
||||
|
|
|
|||
Loading…
Reference in a new issue