[Scummvm-cvs-logs] SF.net SVN: scummvm: [29435] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Tue Nov 6 18:23:33 CET 2007
Revision: 29435
http://scummvm.svn.sourceforge.net/scummvm/?rev=29435&view=rev
Author: fingolfin
Date: 2007-11-06 09:23:33 -0800 (Tue, 06 Nov 2007)
Log Message:
-----------
Patch #1826459: Make: reconfigure on configure change (saving environment)
Modified Paths:
--------------
scummvm/trunk/Makefile
scummvm/trunk/configure
Modified: scummvm/trunk/Makefile
===================================================================
--- scummvm/trunk/Makefile 2007-11-06 12:22:52 UTC (rev 29434)
+++ scummvm/trunk/Makefile 2007-11-06 17:23:33 UTC (rev 29435)
@@ -16,7 +16,7 @@
MODULE_DIRS :=
# Load the make rules generated by configure
-include config.mk
+-include config.mk
CXXFLAGS:= -Wall $(CXXFLAGS)
CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas
@@ -44,9 +44,14 @@
# check if configure has been run or has been changed since last run
config.mk: $(srcdir)/configure
- @echo "You need to run ./configure before you can run make"
- @echo "Either you haven't run it before or it has changed."
- @exit 1
+ifdef CONFIG_MK_IS_PRESENT
+ @echo "Running $(srcdir)/configure with the last specified parameters"
+ @sleep 2s
+ @LDFLAGS=$(SAVED_LDFLAGS) CXX=$(SAVED_CXX) CXXFLAGS=$(SAVED_CXXFLAGS) CPPFLAGS=$(SAVED_CPPFLAGS) \
+ $(srcdir)/configure $(SAVED_CONFIGFLAGS)
+else
+ $(error You need to run $(srcdir)/configure before you can run make. Check $(srcdir)/configure --help for a list of parameters)
+endif
install: all
$(INSTALL) -d "$(DESTDIR)$(BINDIR)"
Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure 2007-11-06 12:22:52 UTC (rev 29434)
+++ scummvm/trunk/configure 2007-11-06 17:23:33 UTC (rev 29435)
@@ -9,6 +9,12 @@
# * detect whether the chosen backend is available (e.g. call sdl-config)
# * ....
+# Save the current environment variables for next runs
+SAVED_CONFIGFLAGS=$@
+SAVED_LDFLAGS=$LDFLAGS
+SAVED_CXX=$CXX
+SAVED_CXXFLAGS=$CXXFLAGS
+SAVED_CPPFLAGS=$CPPFLAGS
# use environment vars if set
CXXFLAGS="$CXXFLAGS $CPPFLAGS"
@@ -1625,6 +1631,14 @@
OBJS += $OBJS
DEFINES += $DEFINES
LDFLAGS += $LDFLAGS
+
+SAVED_CONFIGFLAGS := $SAVED_CONFIGFLAGS
+SAVED_LDFLAGS := $SAVED_LDFLAGS
+SAVED_CXX := $SAVED_CXX
+SAVED_CXXFLAGS := $SAVED_CXXFLAGS
+SAVED_CPPFLAGS := $SAVED_CPPFLAGS
+
+CONFIG_MK_IS_PRESENT := 1
EOF
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list