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: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2015-10-06 09:05:51 -04:00
commit 30e10c6ee6

6
Kbuild
View file

@ -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) \