From 5c17a5582ea1013b85b6d10adb68061ffb0302fe Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Thu, 6 Nov 2008 08:16:10 +0000 Subject: [PATCH] Produce an error message if a TARGET= does not exist --- Makefile.include | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile.include b/Makefile.include index 1b420a560..719f0c3da 100644 --- a/Makefile.include +++ b/Makefile.include @@ -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