defs.mk, platform.mk: Include pre-local.mk and cache.mk from platform.mk

platform.mk is sometimes included before defs.mk, e.g. from
$(TOPDIR)/make/proj.mk, then these definitions are necessary

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-03-03 09:56:11 +00:00
commit 59da607e12
2 changed files with 13 additions and 13 deletions

View file

@ -3,6 +3,19 @@
ifndef PLATFORM_MK_INCLUDED
PLATFORM_MK_INCLUDED = true
# "-include" tries search path, we don't want that
define try_include
ifneq ($$(wildcard $(1)),)
include $(1)
endif
endef
$(eval $(call try_include,$(MODDIR)/make/.cache.mk))
$(eval $(call try_include,$(TOPDIR)/make/.cache.mk))
$(eval $(call try_include,$(MODDIR)/make/pre-local.mk))
$(eval $(call try_include,$(TOPDIR)/make/pre-local.mk))
$(eval $(call try_include,pre-local.mk))
ifndef TARGET
ifneq ($(subst mingw,,$(CWD)),$(CWD))
TARGET := mingw