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:
parent
b7881fecfa
commit
30e10c6ee6
1 changed files with 5 additions and 1 deletions
6
Kbuild
6
Kbuild
|
@ -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) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue