Commit 30e10c6e authored by Anas Nashif's avatar Anas Nashif
Browse files

mdef: do not try to use MDEF file if it was not defined



In some cases an MDEF file is not needed, especially when using
private objects. Check if the MDEF file actually exists and define
before trying to use it.

Change-Id: I69c78e6d30bc0df0397e5ae354f91b774fcb737c
Signed-off-by: default avatarAnas Nashif <anas.nashif@intel.com>
parent b7881fec
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -9,8 +9,10 @@ endif
ifneq ("$(wildcard $(MDEF_FILE))","")
MDEF_FILE_PATH=$(MDEF_FILE)
else
ifneq ($(MDEF_FILE),)
MDEF_FILE_PATH=$(PROJECT_BASE)/$(MDEF_FILE)
endif
endif

define filechk_prj.mdef
	(echo "% WARNING. THIS FILE IS AUTO-GENERATED. DO NOT MODIFY!"; \
@@ -36,7 +38,9 @@ define filechk_prj.mdef
		i=$$(($$i+1));\
		done; \
	fi; \
	cat $(MDEF_FILE_PATH);)
	if test -e "$(MDEF_FILE_PATH)"; then \
		cat $(MDEF_FILE_PATH); \
	fi;)
endef

misc/generated/sysgen/prj.mdef:	$(MDEF_FILE_PATH) \