changeset 28504:b983d65e840c

On clean/distclean, remove binaries with all types of executable suffixes. This helps clean a tree completely before and after crosscompiling.
author diego
date Thu, 12 Feb 2009 12:17:50 +0000
parents 3d22c6da29c9
children f3fa6fe243e6
files Makefile configure
diffstat 2 files changed, 18 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Feb 12 12:13:07 2009 +0000
+++ b/Makefile	Thu Feb 12 12:17:50 2009 +0000
@@ -929,16 +929,18 @@
 	rm -f $(MANDIR)/man1/mplayer.1 $(MANDIR)/man1/mencoder.1
 	rm -f $(foreach lang,$(MAN_LANGS),$(foreach man,mplayer.1 mencoder.1,$(MANDIR)/$(lang)/man1/$(man)))
 
+ADD_ALL_EXESUFS = $(foreach exesuf,$(EXESUFS_ALL),$(1) $(1)$(exesuf))
+
 clean:
 	rm -f $(foreach dir,$(DIRS),$(foreach suffix,/*.o /*.a /*.ho /*~, $(addsuffix $(suffix),$(dir))))
-	rm -f mplayer$(EXESUF) mencoder$(EXESUF)
+	rm -f $(foreach file,mplayer mencoder,$(call ADD_ALL_EXESUFS,$(file)))
 
 distclean: clean testsclean toolsclean driversclean dhahelperclean dhahelperwinclean
 	rm -rf DOCS/tech/doxygen
 	rm -f $(foreach dir,$(DIRS),$(foreach suffix,/*.d, $(addsuffix $(suffix),$(dir))))
 	rm -f configure.log config.mak config.h codecs.conf.h help_mp.h \
-           version.h $(VIDIX_PCI_FILES) \
-           codec-cfg$(EXESUF) cpuinfo$(EXESUF) TAGS tags
+           version.h $(VIDIX_PCI_FILES) TAGS tags
+	rm -f $(foreach file,codec-cfg cpuinfo,$(call ADD_ALL_EXESUFS,$(file)))
 
 doxygen:
 	doxygen DOCS/tech/Doxyfile
@@ -972,34 +974,32 @@
 
 mp3lib/test$(EXESUF) mp3lib/test2$(EXESUF): $(filter mp3lib/%,$(SRCS_COMMON:.c=.o)) libvo/aclib.o cpudetect.o $(TEST_OBJS)
 
-TESTS = codecs2html$(EXESUF) codec-cfg-test$(EXESUF) \
-        liba52/test$(EXESUF) libvo/aspecttest$(EXESUF) \
-        mp3lib/test$(EXESUF) mp3lib/test2$(EXESUF)
+TESTS = codecs2html codec-cfg-test liba52/test libvo/aspecttest \
+        mp3lib/test mp3lib/test2
 
 ifdef ARCH_X86
-TESTS += loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF)
+TESTS += loader/qtx/list loader/qtx/qtxload
 endif
 
-tests: $(TESTS)
+tests: $(addsuffix $(EXESUF),$(TESTS))
 
 testsclean:
-	rm -f $(TESTS)
+	rm -f $(foreach file,$(TESTS),$(call ADD_ALL_EXESUFS,$(file)))
 
-TOOLS = $(addsuffix $(EXESUF),$(addprefix TOOLS/,alaw-gen asfinfo avi-fix avisubdump compare dump_mp4 movinfo netstream subrip vivodump))
+TOOLS = $(addprefix TOOLS/,alaw-gen asfinfo avi-fix avisubdump compare dump_mp4 movinfo netstream subrip vivodump)
 
 ifdef ARCH_X86
-TOOLS += TOOLS/modify_reg$(EXESUF)
+TOOLS += TOOLS/modify_reg
 endif
 
-ALLTOOLS = $(TOOLS) \
-           TOOLS/bmovl-test$(EXESUF) \
-           TOOLS/vfw2menc$(EXESUF) \
+ALLTOOLS = $(TOOLS) TOOLS/bmovl-test TOOLS/vfw2menc
 
-tools: $(TOOLS)
-alltools: $(ALLTOOLS)
+tools: $(addsuffix $(EXESUF),$(TOOLS))
+alltools: $(addsuffix $(EXESUF),$(ALLTOOLS))
 
 toolsclean:
-	rm -f $(ALLTOOLS) TOOLS/fastmem*-* TOOLS/realcodecs/*.so.6.0
+	rm -f $(foreach file,$(ALLTOOLS),$(call ADD_ALL_EXESUFSx,$(file)))
+	rm -f TOOLS/fastmem*-* TOOLS/realcodecs/*.so.6.0
 
 TOOLS/bmovl-test$(EXESUF): -lSDL_image
 
--- a/configure	Thu Feb 12 12:13:07 2009 +0000
+++ b/configure	Thu Feb 12 12:17:50 2009 +0000
@@ -8010,6 +8010,7 @@
 TIMER = $_timer
 
 EXESUF = $_exesuf
+EXESUFS_ALL = .exe
 
 $_target_arch
 $_target_arch_x86