diff options
author | Steven Noonan <steven@uplinklabs.net> | 2009-10-25 14:55:21 -0700 |
---|---|---|
committer | Steven Noonan <steven@uplinklabs.net> | 2009-10-25 14:55:21 -0700 |
commit | d6e7e3908b6c7b27fab61074eb0b688276a5a5b6 (patch) | |
tree | 9149e0c6c63971425a19ba8352124d40d1116233 | |
parent | 6d2b0d5c6b3648b54cfdf079f8b4789734917b91 (diff) | |
download | crawl-ref-d6e7e3908b6c7b27fab61074eb0b688276a5a5b6.tar.gz crawl-ref-d6e7e3908b6c7b27fab61074eb0b688276a5a5b6.zip |
makefiles: improve 'clean' and 'distclean' targets to clean all outputs
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
-rw-r--r-- | crawl-ref/source/makefile | 10 | ||||
-rw-r--r-- | crawl-ref/source/rltiles/makefile.unix | 3 |
2 files changed, 10 insertions, 3 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile index a34a59fedd..6d2b01e57f 100644 --- a/crawl-ref/source/makefile +++ b/crawl-ref/source/makefile @@ -120,6 +120,10 @@ endif # include makefile.obj +ifneq (,$(findstring clean,$(MAKECMDGOALS))) +TILES := YesPlease +endif + # Works for Mac OS X and Linux. OBJECTS += crash-u.o @@ -699,13 +703,14 @@ endif clean: +$(MAKE) -C $(UTIL) clean - $(RM) $(OBJECTS) $(OBJECTS:.o=.d) *.ixx build.h compflag.h .contrib-ok + +$(MAKE) -C $(RLTILES) -f makefile.unix clean + $(RM) $(GAME) $(GAME).exe $(EXTRA_OBJECTS) $(OBJECTS) $(OBJECTS:.o=.d) *.ixx build.h compflag.h .contrib-ok .contrib-libs clean-contrib: +$(MAKE) -C contrib clean distclean: clean clean-contrib clean-rltiles - $(RM) bones.* morgue.txt scores $(GAME) *.sav core *.0* *.lab $(DEPENDENCY_MKF) + $(RM) morgue saves scores $(GAME) core *.0* *.lab $(DEPENDENCY_MKF) .contrib-ok: @for a in contrib/lua/src/Makefile contrib/sqlite/Makefile contrib/pcre/Makefile; do \ @@ -779,6 +784,7 @@ dat/tiles/%.png: $(RLTILES)/%.png $(QUIET_COPY)$(COPY) $< $@ clean-rltiles: + $(RM) $(DESTTILEFILES) +$(MAKE) -C $(RLTILES) -f makefile.unix distclean ############################################################################# diff --git a/crawl-ref/source/rltiles/makefile.unix b/crawl-ref/source/rltiles/makefile.unix index c693549fbf..3a1abb71ed 100644 --- a/crawl-ref/source/rltiles/makefile.unix +++ b/crawl-ref/source/rltiles/makefile.unix @@ -40,6 +40,7 @@ TILEGEN := $(TOOLDIR)/tilegen.elf INPUTS := main dngn player gui INPUTFILES := $(INPUTS:%=dc-%.txt) HEADERS := $(INPUTS:%=tiledef-%.h) +HTML := $(INPUTS:%=tile-%.html) SOURCE := $(INPUTS:%=tiledef-%.cc) IMAGES := $(INPUTS:%=%.png) @@ -61,7 +62,7 @@ tiledef-%.h tiledef-%.cc %.png: dc-%.txt $(TILEGEN) $(QUIET_GEN)$(TILEGEN) $< clean: - $(DELETE) $(HEADERS) $(OBJECTS) $(TILEGEN) $(SOURCE) $(IMAGES) + $(DELETE) $(HEADERS) $(OBJECTS) $(TILEGEN) $(SOURCE) $(IMAGES) $(HTML) distclean: clean |