Produce an error message if a TARGET= does not exist

ico
adamdunkels 2008-11-06 08:16:10 +00:00
parent da7877e8ab
commit 5c17a5582e
1 changed files with 8 additions and 1 deletions

View File

@ -94,7 +94,14 @@ endif
### Include target makefile (TODO Unsafe?)
include $(CONTIKI)/platform/$(TARGET)/Makefile.$(TARGET)
target_makefile := $(wildcard $(CONTIKI)/platform/$(TARGET)/Makefile.$(TARGET))
# Check if the target makefile exists
ifeq ($(strip $(target_makefile)),)
${error The target platform "$(TARGET)" does not exist (maybe it was misspelled?)}
else
include $(CONTIKI)/platform/$(TARGET)/Makefile.$(TARGET)
endif
### Forward comma-separated list of arbitrary defines to the compiler