Skip to content

Commit

Permalink
Produce an error message if a TARGET= does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdunkels committed Nov 6, 2008
1 parent da7877e commit 5c17a55
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5c17a55

Please sign in to comment.