summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Noonan <steven@uplinklabs.net>2009-11-12 13:36:12 -0800
committerSteven Noonan <steven@uplinklabs.net>2009-11-14 00:29:35 -0800
commit793840497955f01f4d2dbc9abde6fed7c4c83402 (patch)
tree74432aa4d2c3b17a0d12ba7eefdc0b9472b03943
parent0243dd75b788cc7d6997520518ebfe6ccbd7b4e4 (diff)
downloadcrawl-ref-793840497955f01f4d2dbc9abde6fed7c4c83402.tar.gz
crawl-ref-793840497955f01f4d2dbc9abde6fed7c4c83402.zip
makefile: only do dependency generation on build of $(GAME)
This is _hardly_ an ideal solution. It would look a lot cleaner than this if you could use a logical OR operator, but Makefile syntax doesn't have such an operator for ifeq/ifneq. But this will resolve the situation for the moment. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
-rw-r--r--crawl-ref/source/makefile28
1 files changed, 24 insertions, 4 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile
index dce19bd4b9..63bc786a3d 100644
--- a/crawl-ref/source/makefile
+++ b/crawl-ref/source/makefile
@@ -416,9 +416,28 @@ endif
# Figure out the build settings for this type of build
#
+# All
+# Default target.
+ifneq (,$(findstring all,$(MAKECMDGOALS)))
+ USE_DEPGEN=YesPlease
+endif
+
+# All
+# Default target.
+ifeq (,$(MAKECMDGOALS))
+ USE_DEPGEN=YesPlease
+endif
+
+# $(GAME)
+# Another default target.
+ifneq (,$(findstring $(GAME),$(MAKECMDGOALS)))
+ USE_DEPGEN=YesPlease
+endif
+
# Debug
# No optimization, full debugging.
ifneq (,$(findstring debug,$(MAKECMDGOALS)))
+ USE_DEPGEN=YesPlease
FULLDEBUG=YesPlease
WIZARD=YesPlease
DEBUG=YesPlease
@@ -428,6 +447,7 @@ endif
# Wizard
# Optimized, with wizard mode.
ifneq (,$(findstring wizard,$(MAKECMDGOALS)))
+ USE_DEPGEN=YesPlease
WIZARD=YesPlease
DEBUG=YesPlease
endif
@@ -435,6 +455,7 @@ endif
# Profile
# Optimized, with full debugging.
ifneq (,$(findstring profile,$(MAKECMDGOALS)))
+ USE_DEPGEN=YesPlease
FULLDEBUG=YesPlease
WIZARD=YesPlease
DEBUG=YesPlease
@@ -697,6 +718,8 @@ TRACK_CFLAGS = $(subst ','\'',$(CC) $(CXX) $(ALL_CFLAGS)) # (stray ' f
##########################################################################
# Dependencies
+ifdef USE_DEPGEN
+
DEPS := $(OBJECTS:.o=.d)
ifeq ($(shell which fastdep 2> /dev/null),)
@@ -710,12 +733,9 @@ endif
depend: $(DEPS)
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(MAKECMDGOALS),distclean)
-include $(DEPS)
-endif
-endif
+endif
# This information is included in crash reports, and is printed with
# "crawl -version"