[FFmpeg-cvslog] build: fix 'clean' target
Diego Biurrun
git at videolan.org
Thu Jan 17 02:04:32 CET 2013
ffmpeg | branch: release/0.10 | Diego Biurrun <diego at biurrun.de> | Thu Jan 3 15:30:22 2013 +0100| [26b177b8f7abb2058fdd3a9142e26f118eaad294] | committer: Diego Biurrun
build: fix 'clean' target
This fixes removal of TOOLS as well as HOSTPROGS declared in the
top-level Makefile. The clean target in common.mak needs to be
eval'd since the variables used within are reset for each library.
(cherry picked from commit 395c3feb3bb165af5760d287a9a64344b6269fe2)
Conflicts:
common.mak
library.mak
Signed-off-by: Diego Biurrun <diego at biurrun.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=26b177b8f7abb2058fdd3a9142e26f118eaad294
---
Makefile | 1 -
common.mak | 9 +++++++++
library.mak | 3 +--
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index ff871c4..96e3a87 100644
--- a/Makefile
+++ b/Makefile
@@ -172,7 +172,6 @@ uninstall-data:
clean::
$(RM) $(ALLPROGS)
$(RM) $(CLEANSUFFIXES)
- $(RM) $(TOOLS)
$(RM) $(CLEANSUFFIXES:%=tools/%)
distclean::
diff --git a/common.mak b/common.mak
index d781ced..9193455 100644
--- a/common.mak
+++ b/common.mak
@@ -49,4 +49,13 @@ CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver
DISTCLEANSUFFIXES = *.pc
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp
+define RULES
+clean::
+ $(RM) $(OBJS) $(OBJS:.o=.d)
+ $(RM) $(HOSTPROGS)
+ $(RM) $(TOOLS)
+endef
+
+$(eval $(RULES))
+
-include $(wildcard $(OBJS:.o=.d) $(TESTOBJS:.o=.d))
diff --git a/library.mak b/library.mak
index f50e8e5..8dde8f4 100644
--- a/library.mak
+++ b/library.mak
@@ -47,8 +47,7 @@ $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver $(DEP_LIBS)
clean::
$(RM) $(addprefix $(SUBDIR),*-example$(EXESUF) *-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
- $(foreach dir,$(DIRS),$(CLEANSUFFIXES:%=$(SUBDIR)$(dir)/%)) \
- $(HOSTOBJS) $(HOSTPROGS)
+ $(foreach dir,$(DIRS),$(CLEANSUFFIXES:%=$(SUBDIR)$(dir)/%))
distclean:: clean
$(RM) $(DISTCLEANSUFFIXES:%=$(SUBDIR)%) \
More information about the ffmpeg-cvslog
mailing list