mirror of https://git.ffmpeg.org/ffmpeg.git
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 395c3feb3b
)
Conflicts:
common.mak
library.mak
Signed-off-by: Diego Biurrun <diego@biurrun.de>
This commit is contained in:
parent
dcf8f259d1
commit
26b177b8f7
1
Makefile
1
Makefile
|
@ -172,7 +172,6 @@ uninstall-data:
|
|||
clean::
|
||||
$(RM) $(ALLPROGS)
|
||||
$(RM) $(CLEANSUFFIXES)
|
||||
$(RM) $(TOOLS)
|
||||
$(RM) $(CLEANSUFFIXES:%=tools/%)
|
||||
|
||||
distclean::
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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)%) \
|
||||
|
|
Loading…
Reference in New Issue