[FFmpeg-cvslog] build: fix 'clean' target
Mans Rullgard
git at videolan.org
Tue Dec 11 08:38:39 CET 2012
ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Mon Dec 10 14:55:28 2012 +0000| [395c3feb3bb165af5760d287a9a64344b6269fe2] | committer: Mans Rullgard
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.
Signed-off-by: Mans Rullgard <mans at mansr.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=395c3feb3bb165af5760d287a9a64344b6269fe2
---
Makefile | 1 -
common.mak | 6 ++++++
library.mak | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index c4dc80c..291197b 100644
--- a/Makefile
+++ b/Makefile
@@ -187,7 +187,6 @@ uninstall-data:
clean::
$(RM) $(ALLPROGS)
$(RM) $(CLEANSUFFIXES)
- $(RM) $(TOOLS)
$(RM) $(CLEANSUFFIXES:%=tools/%)
distclean::
diff --git a/common.mak b/common.mak
index c4d2999..5d80986 100644
--- a/common.mak
+++ b/common.mak
@@ -53,7 +53,13 @@ CLEANSUFFIXES = *.d *.o *~ *.h.c *.map *.ver
DISTCLEANSUFFIXES = *.pc
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a
+define RULES
clean::
$(RM) $(OBJS) $(OBJS:.o=.d)
+ $(RM) $(HOSTPROGS)
+ $(RM) $(TOOLS)
+endef
+
+$(eval $(RULES))
-include $(wildcard $(OBJS:.o=.d) $(HOSTOBJS:.o=.d) $(TESTOBJS:.o=.d) $(HOBJS:.o=.d))
diff --git a/library.mak b/library.mak
index 9309c42..3b4bd2d 100644
--- a/library.mak
+++ b/library.mak
@@ -58,7 +58,7 @@ $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver $(DEP_LIBS)
clean::
$(RM) $(addprefix $(SUBDIR),*-example$(EXESUF) *-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
- $(CLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%) $(HOSTOBJS) $(HOSTPROGS)
+ $(CLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%)
distclean:: clean
$(RM) $(DISTCLEANSUFFIXES:%=$(SUBDIR)%) $(DISTCLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%)
More information about the ffmpeg-cvslog
mailing list