From 1c8e4bfc9f12644489da7716bcf215372f37404f Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 12 Feb 2009 12:13:07 +0000 Subject: Use addprefix and addsuffix functions to generate TOOLS variable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28538 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Makefile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6d849ab9c0..8039ca1b2a 100644 --- a/Makefile +++ b/Makefile @@ -985,16 +985,7 @@ tests: $(TESTS) testsclean: rm -f $(TESTS) -TOOLS = TOOLS/alaw-gen$(EXESUF) \ - TOOLS/asfinfo$(EXESUF) \ - TOOLS/avi-fix$(EXESUF) \ - TOOLS/avisubdump$(EXESUF) \ - TOOLS/compare$(EXESUF) \ - TOOLS/dump_mp4$(EXESUF) \ - TOOLS/movinfo$(EXESUF) \ - TOOLS/netstream$(EXESUF) \ - TOOLS/subrip$(EXESUF) \ - TOOLS/vivodump$(EXESUF) \ +TOOLS = $(addsuffix $(EXESUF),$(addprefix TOOLS/,alaw-gen asfinfo avi-fix avisubdump compare dump_mp4 movinfo netstream subrip vivodump)) ifdef ARCH_X86 TOOLS += TOOLS/modify_reg$(EXESUF) -- cgit v1.2.3 From 802f91138e1059be5ddbe2133696f183146bf65b Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 12 Feb 2009 12:17:50 +0000 Subject: On clean/distclean, remove binaries with all types of executable suffixes. This helps clean a tree completely before and after crosscompiling. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28539 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Makefile | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8039ca1b2a..a379af9353 100644 --- a/Makefile +++ b/Makefile @@ -929,16 +929,18 @@ uninstall: 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 @@ loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): $(LOADER_TEST_OBJS) 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 -- cgit v1.2.3 From 62ca18ed4782c32bad4a721bad8673d8804de776 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 12 Feb 2009 12:32:16 +0000 Subject: Ignore errors from all rm commands in clean targets. This way make will not stop on failure and remove as much as possible. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28540 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a379af9353..51e62467f1 100644 --- a/Makefile +++ b/Makefile @@ -932,15 +932,15 @@ uninstall: 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 $(foreach file,mplayer mencoder,$(call ADD_ALL_EXESUFS,$(file))) + -rm -f $(foreach dir,$(DIRS),$(foreach suffix,/*.o /*.a /*.ho /*~, $(addsuffix $(suffix),$(dir)))) + -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 \ + -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) TAGS tags - rm -f $(foreach file,codec-cfg cpuinfo,$(call ADD_ALL_EXESUFS,$(file))) + -rm -f $(foreach file,codec-cfg cpuinfo,$(call ADD_ALL_EXESUFS,$(file))) doxygen: doxygen DOCS/tech/Doxyfile @@ -984,7 +984,7 @@ endif tests: $(addsuffix $(EXESUF),$(TESTS)) testsclean: - rm -f $(foreach file,$(TESTS),$(call ADD_ALL_EXESUFS,$(file))) + -rm -f $(foreach file,$(TESTS),$(call ADD_ALL_EXESUFS,$(file))) TOOLS = $(addprefix TOOLS/,alaw-gen asfinfo avi-fix avisubdump compare dump_mp4 movinfo netstream subrip vivodump) @@ -998,8 +998,8 @@ tools: $(addsuffix $(EXESUF),$(TOOLS)) alltools: $(addsuffix $(EXESUF),$(ALLTOOLS)) toolsclean: - rm -f $(foreach file,$(ALLTOOLS),$(call ADD_ALL_EXESUFSx,$(file))) - rm -f 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 @@ -1067,7 +1067,7 @@ install-drivers: $(DRIVER_OBJS) -ln -s /dev/radeon_vid /dev/rage128_vid driversclean: - rm -f $(DRIVER_OBJS) drivers/*~ + -rm -f $(DRIVER_OBJS) drivers/*~ dhahelper: vidix/dhahelper/dhahelper.o vidix/dhahelper/test @@ -1081,7 +1081,7 @@ install-dhahelper: vidix/dhahelper/dhahelper.o -mknod /dev/dhahelper c 180 0 dhahelperclean: - rm -f vidix/dhahelper/*.o vidix/dhahelper/*~ vidix/dhahelper/test + -rm -f vidix/dhahelper/*.o vidix/dhahelper/*~ vidix/dhahelper/test dhahelperwin: vidix/dhahelperwin/dhasetup.exe vidix/dhahelperwin/dhahelper.sys @@ -1113,7 +1113,7 @@ install-dhahelperwin: vidix/dhahelperwin/dhasetup.exe install dhahelperwinclean: - rm -f $(addprefix vidix/dhahelperwin/,*.o *~ dhahelper.sys dhasetup.exe base.tmp temp.exp) + -rm -f $(addprefix vidix/dhahelperwin/,*.o *~ dhahelper.sys dhasetup.exe base.tmp temp.exp) -- cgit v1.2.3