Added 'savedefines' target working like 'savetarget'. Replaced $(warning...) with $(info...). Aded user feedback for the two 'save...' targets.

This commit is contained in:
oliverschmidt 2007-12-24 15:24:15 +00:00
parent 69faf1ff4d
commit 73027164c8

View File

@ -11,13 +11,18 @@ ifeq ($(TARGET),)
ifeq ($(DEFAULT_TARGET),)
DEFAULT_TARGET=native
endif
${warning TARGET not defined, using target '$(DEFAULT_TARGET)'}
${info TARGET not defined, using target '$(DEFAULT_TARGET)'}
TARGET=$(DEFAULT_TARGET)
else
${warning using saved target '$(TARGET)'}
${info using saved target '$(TARGET)'}
endif
endif
ifeq ($(DEFINES),)
-include Makefile.$(TARGET).defines
${info using saved defines '$(DEFINES)'}
endif
usage:
@echo "make MAKETARGETS... [TARGET=(TARGET)] [savetarget] [targets]"
@ -26,8 +31,14 @@ targets:
savetarget:
-@rm -f Makefile.target
@echo "saving Makefile.target"
@echo >Makefile.target "TARGET = $(TARGET)"
savedefines:
-@rm -f Makefile.$(TARGET).defines
@echo "saving Makefile.$(TARGET).defines"
@echo >Makefile.$(TARGET).defines "DEFINES = $(DEFINES)"
ifeq (${wildcard $(OBJECTDIR)},)
DUMMY := ${shell mkdir $(OBJECTDIR)}
endif