diff options
author | Anas Nashif <anas.nashif@intel.com> | 2015-10-06 09:05:51 -0400 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2016-02-05 20:24:23 -0500 |
commit | 30e10c6ee6ea964a67af86cc87efd56ef29d2649 (patch) | |
tree | fd69643444a1f3c761106c0f0f5c9b42d848da10 /Kbuild | |
parent | b7881fecfaf4b80bd578d66319719cf9e9f119f3 (diff) |
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>
Diffstat (limited to 'Kbuild')
-rw-r--r-- | Kbuild | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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) \ |