From 73027164c8b98ec0250b271b0d95a54e766f8584 Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Mon, 24 Dec 2007 15:24:15 +0000 Subject: [PATCH] Added 'savedefines' target working like 'savetarget'. Replaced $(warning...) with $(info...). Aded user feedback for the two 'save...' targets. --- Makefile.include | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile.include b/Makefile.include index 6119031a8..1633d5c66 100644 --- a/Makefile.include +++ b/Makefile.include @@ -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