[Scummvm-cvs-logs] SF.net SVN: scummvm:[51442] tools/trunk/Makefile.common

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Jul 29 00:16:16 CEST 2010


Revision: 51442
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51442&view=rev
Author:   fingolfin
Date:     2010-07-28 22:16:15 +0000 (Wed, 28 Jul 2010)

Log Message:
-----------
TOOLS: Automatically populate MODULE_DIRS

Previously it was very easy to forget to update MODULE_DIRS, which
could lead to annoying issues with files not being rebuilt when
they should have been.

Modified Paths:
--------------
    tools/trunk/Makefile.common

Modified: tools/trunk/Makefile.common
===================================================================
--- tools/trunk/Makefile.common	2010-07-28 22:07:38 UTC (rev 51441)
+++ tools/trunk/Makefile.common	2010-07-28 22:16:15 UTC (rev 51442)
@@ -18,31 +18,7 @@
 
 #MODULES := test tools base $(MODULES)
 
-# HACK: Until we get proper module support, add these "module dirs" to
-# get the dependency tracking code working.
-MODULE_DIRS := ./ common/ gui/ sound/
 
-MODULE_DIRS += \
-	engines/agos/ \
-	engines/cine/ \
-	engines/cruise/ \
-	engines/gob/ \
-	engines/groovie/ \
-	engines/kyra/ \
-	engines/mohawk/ \
-	engines/mohawk/utils/ \
-	engines/parallaction/ \
-	engines/queen/ \
-	engines/saga/ \
-	engines/scumm/ \
-	engines/sci/ \
-	engines/sword1/ \
-	engines/sword2/ \
-	engines/tinsel/ \
-	engines/touche/ \
-	engines/tucker/
-
-
 # TODO: This file should be restructured and much of it moved
 # to module.mk style files.
 
@@ -81,9 +57,6 @@
 	sword2_clue
 endif
 
-# Generate list of tool binaries
-TARGETS := $(addsuffix $(EXEEXT),$(PROGRAMS))
-
 UTILS := \
 	common/file.o \
 	common/hashmap.o \
@@ -96,13 +69,6 @@
 	sound/voc.o \
 	sound/wave.o
 
-all: $(TARGETS)
-
-install: $(TARGETS)
-	for i in $^ ; do $(INSTALL) -p -m 0755 $$i $(DESTDIR)$(BINDIR) ; done
-	$(INSTALL) -m 0755 -d $(DESTDIR)$(DATADIR)/scummvm-tools
-	$(INSTALL) -p -m 0644 $(srcdir)/gui/media/*.* $(DESTDIR)$(DATADIR)/scummvm-tools
-
 bundle_name = ScummVM\ Tools.app
 bundle: scummvm-tools$(EXEEXT)
 	mkdir -p $(bundle_name)
@@ -289,9 +255,21 @@
 
 ######################################################################
 
+# Generate list of tool binaries
+TARGETS := $(addsuffix $(EXEEXT),$(PROGRAMS))
+
+all: $(TARGETS)
+
+install: $(TARGETS)
+	for i in $^ ; do $(INSTALL) -p -m 0755 $$i $(DESTDIR)$(BINDIR) ; done
+	$(INSTALL) -m 0755 -d $(DESTDIR)$(DATADIR)/scummvm-tools
+	$(INSTALL) -p -m 0644 $(srcdir)/gui/media/*.* $(DESTDIR)$(DATADIR)/scummvm-tools
+
 # Template for all executable targets.
 # This also automatically hooks up a "clean" rule.
+# It also sets up MODULE_DIRS.
 define PROGRAM_template
+MODULE_DIRS += $(dir $($(1)_OBJS))
 $(1)$(EXEEXT): $$($(1)_OBJS)
 	$(QUIET_LINK)$(LD) -o $(1)$(EXEEXT) $$($(1)_OBJS) $(LDFLAGS) $$($(1)_LIBS)
 #all: $(1)$(EXEEXT)
@@ -303,6 +281,8 @@
 # Generate build rules for all tools
 $(foreach prog,$(PROGRAMS),$(eval $(call PROGRAM_template,$(prog))))
 
+# Merge duplicate entries in MODULE_DIRS
+MODULE_DIRS := $(sort $(MODULE_DIRS))
 
 ######################################################################
 


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