Don't create an object directory if target does not exist

This commit is contained in:
dak664 2011-03-10 14:59:21 -05:00
parent 2295238ee1
commit bb574fd1e2
2 changed files with 4 additions and 6 deletions

View file

@ -36,9 +36,6 @@ savedefines:
@echo >Makefile.$(TARGET).defines "DEFINES = $(DEFINES)"
OBJECTDIR = obj_$(TARGET)
ifeq (${wildcard $(OBJECTDIR)},)
DUMMY := ${shell mkdir $(OBJECTDIR)}
endif
LOWERCASE = -abcdefghijklmnopqrstuvwxyz
UPPERCASE = _ABCDEFGHIJKLMNOPQRSTUVWXYZ
@ -109,10 +106,13 @@ endif
target_makefile := $(wildcard $(CONTIKI)/platform/$(TARGET)/Makefile.$(TARGET))
# Check if the target makefile exists
# Check if the target makefile exists, and create the object directory if necessary.
ifeq ($(strip $(target_makefile)),)
${error The target platform "$(TARGET)" does not exist (maybe it was misspelled?)}
else
ifeq (${wildcard $(OBJECTDIR)},)
DUMMY := ${shell mkdir $(OBJECTDIR)}
endif
include $(CONTIKI)/platform/$(TARGET)/Makefile.$(TARGET)
endif