From f44e72db13c0e9b60d2050093e1d843f77ecee3f Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Wed, 14 Oct 2009 02:09:19 -0700 Subject: makefiles: 'clean'/'distclean' now do RM on all intermediates at once Signed-off-by: Steven Noonan --- crawl-ref/source/makefile | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'crawl-ref/source/makefile') diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile index 81c1b9accb..a6246b1b0a 100644 --- a/crawl-ref/source/makefile +++ b/crawl-ref/source/makefile @@ -39,10 +39,11 @@ CFWARN := -Wall AR = ar rcu CC = $(GCC) CXX = $(GXX) -DELETE = rm -f +RM = rm -f COPY = cp export AR +export RM export CC export CXX export CFLAGS @@ -644,8 +645,7 @@ endif clean: +$(MAKE) -C $(UTIL) clean - $(DELETE) *.o - $(DELETE) *.ixx + $(RM) *.o *.ixx clean-lua: +$(MAKE) -C $(LUASRC) clean @@ -654,15 +654,7 @@ clean-sql: +$(MAKE) -C $(SQLSRC) clean distclean: clean clean-lua clean-sql clean-rltiles - $(DELETE) bones.* - $(DELETE) morgue.txt - $(DELETE) scores - $(DELETE) $(GAME) - $(DELETE) *.sav - $(DELETE) core - $(DELETE) *.0* - $(DELETE) *.lab - $(DELETE) $(DEPENDENCY_MKF) + $(RM) bones.* morgue.txt scores $(GAME) *.sav core *.0* *.lab $(DEPENDENCY_MKF) $(GAME): $(GAME_DEPENDS) $(QUIET_LINK)$(CXX) $(LDFLAGS) $(EXTRA_OBJECTS) $(OBJECTS) -o $(GAME) $(LIB) @@ -746,11 +738,11 @@ package-source: distclean prebuildyacc pkgtidy depend removeold vlink \ pkgtarbz2 pkgzip pkgtidy: - $(DELETE) $(PKG_TIDY_LIST) + $(RM) $(PKG_TIDY_LIST) removeold: - if [ -f ../../$(SRC_PKG_TAR) ]; then $(DELETE) ../../$(SRC_PKG_TAR); fi - if [ -f ../../$(SRC_PKG_ZIP) ]; then $(DELETE) ../../$(SRC_PKG_ZIP); fi + if [ -f ../../$(SRC_PKG_TAR) ]; then $(RM) ../../$(SRC_PKG_TAR); fi + if [ -f ../../$(SRC_PKG_ZIP) ]; then $(RM) ../../$(SRC_PKG_ZIP); fi # [ds] Existing directory names could produce a bad package! vlink: -- cgit v1.2.3-54-g00ecf