[Scummvm-cvs-logs] SF.net SVN: scummvm: [30473] scummvm/trunk

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Jan 13 18:05:43 CET 2008


Revision: 30473
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30473&view=rev
Author:   fingolfin
Date:     2008-01-13 09:05:43 -0800 (Sun, 13 Jan 2008)

Log Message:
-----------
Various small patches to the build system by jvprat

Modified Paths:
--------------
    scummvm/trunk/Makefile
    scummvm/trunk/Makefile.common
    scummvm/trunk/configure
    scummvm/trunk/tools/module.mk

Modified: scummvm/trunk/Makefile
===================================================================
--- scummvm/trunk/Makefile	2008-01-13 14:44:29 UTC (rev 30472)
+++ scummvm/trunk/Makefile	2008-01-13 17:05:43 UTC (rev 30473)
@@ -36,6 +36,19 @@
 #CXXFLAGS+= -O -Wuninitialized
 
 #######################################################################
+# Default commands - put the necessary replacements in config.mk      #
+#######################################################################
+
+CAT     ?= cat
+CP      ?= cp
+ECHO    ?= printf
+INSTALL ?= install
+MKDIR   ?= mkdir -p
+RM      ?= rm -f
+RM_REC  ?= $(RM) -r
+ZIP     ?= zip -q
+
+#######################################################################
 # Misc stuff - you should never have to edit this                     #
 #######################################################################
 
@@ -44,8 +57,8 @@
 include $(srcdir)/Makefile.common
 
 # check if configure has been run or has been changed since last run
-config.mk: $(srcdir)/configure
-ifdef CONFIG_MK_IS_PRESENT
+config.h config.mk: $(srcdir)/configure
+ifeq "$(findstring config.mk,$(MAKEFILE_LIST))" "config.mk"
 	@echo "Running $(srcdir)/configure with the last specified parameters"
 	@sleep 2s
 	LDFLAGS="$(SAVED_LDFLAGS)" CXX="$(SAVED_CXX)" CXXFLAGS="$(SAVED_CXXFLAGS)" CPPFLAGS="$(SAVED_CPPFLAGS)" \

Modified: scummvm/trunk/Makefile.common
===================================================================
--- scummvm/trunk/Makefile.common	2008-01-13 14:44:29 UTC (rev 30472)
+++ scummvm/trunk/Makefile.common	2008-01-13 17:05:43 UTC (rev 30473)
@@ -79,7 +79,7 @@
 ifndef HAVE_GCC3
 # If you use GCC, disable the above and enable this for intelligent
 # dependency tracking. 
-.cpp.o:
+%.o: %.cpp
 	$(MKDIR) $(*D)/$(DEPDIR)
 	$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d2" $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
 	$(ECHO) "$(*D)/" > $(*D)/$(DEPDIR)/$(*F).d
@@ -90,18 +90,16 @@
 # rule can get you into a bad state if you Ctrl-C at the wrong moment.
 # Also, with this GCC inserts additional dummy rules for the involved headers,
 # which ensures a smooth compilation even if said headers become obsolete.
-.cpp.o:
+%.o: %.cpp
 	$(MKDIR) $(*D)/$(DEPDIR)
 	$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
-.m.o:
+%.o: %.m
 	$(MKDIR) $(*D)/$(DEPDIR)
 	$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(OBJCFLAGS) -c $(<) -o $*.o
 endif
 
 ifdef HAVE_NASM
-.SUFFIXES: .asm
-
-.asm.o:
+%.o: %.asm
 	$(NASM) -O1 $(NASMFLAGS) -g -o $*.o $(<)
 endif
 

Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure	2008-01-13 14:44:29 UTC (rev 30472)
+++ scummvm/trunk/configure	2008-01-13 17:05:43 UTC (rev 30473)
@@ -109,15 +109,7 @@
 # more defaults
 _backend=sdl
 _ranlib=ranlib
-_install=install
 _ar="ar cru"
-_mkdir="mkdir -p"
-_echo=printf
-_cat=cat
-_rm="rm -f"
-_rm_rec="$_rm -r"
-_zip="zip -q"
-_cp=cp
 _windres=windres
 _win32path="C:/scummvm"
 _aos4path="Games:ScummVM_Snapshot"
@@ -1646,15 +1638,7 @@
 CXXFLAGS := $CXXFLAGS
 LIBS += $LIBS
 RANLIB := $_ranlib
-INSTALL := $_install
 AR := $_ar
-MKDIR := $_mkdir
-ECHO := $_echo
-CAT := $_cat
-RM := $_rm
-RM_REC := $_rm_rec
-ZIP := $_zip
-CP := $_cp
 WINDRES := $_windres
 WIN32PATH=$_win32path
 AOS4PATH=$_aos4path
@@ -1685,8 +1669,6 @@
 SAVED_CXX         := $SAVED_CXX
 SAVED_CXXFLAGS    := $SAVED_CXXFLAGS
 SAVED_CPPFLAGS    := $SAVED_CPPFLAGS
-
-CONFIG_MK_IS_PRESENT := 1
 EOF
 
 #

Modified: scummvm/trunk/tools/module.mk
===================================================================
--- scummvm/trunk/tools/module.mk	2008-01-13 14:44:29 UTC (rev 30472)
+++ scummvm/trunk/tools/module.mk	2008-01-13 17:05:43 UTC (rev 30473)
@@ -75,4 +75,4 @@
 #	$(srcdir)/tools/credits.pl --cpp > $@
 
 
-.PHONY: clean-tools tools credits md5scumm md5simon
+.PHONY: clean-tools tools credits md5scumm


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