Commit 395c3feb authored by Mans Rullgard's avatar 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: default avatarMans Rullgard <>
parent 2ddf7c88
...@@ -187,7 +187,6 @@ uninstall-data: ...@@ -187,7 +187,6 @@ uninstall-data:
clean:: clean::
$(RM) $(TOOLS)
$(RM) $(CLEANSUFFIXES:%=tools/%) $(RM) $(CLEANSUFFIXES:%=tools/%)
distclean:: distclean::
...@@ -53,7 +53,13 @@ CLEANSUFFIXES = *.d *.o *~ *.h.c *.map *.ver ...@@ -53,7 +53,13 @@ CLEANSUFFIXES = *.d *.o *~ *.h.c *.map *.ver
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a
define RULES
clean:: clean::
$(RM) $(OBJS) $(OBJS:.o=.d) $(RM) $(OBJS) $(OBJS:.o=.d)
$(RM) $(TOOLS)
$(eval $(RULES))
-include $(wildcard $(OBJS:.o=.d) $(HOSTOBJS:.o=.d) $(TESTOBJS:.o=.d) $(HOBJS:.o=.d)) -include $(wildcard $(OBJS:.o=.d) $(HOSTOBJS:.o=.d) $(TESTOBJS:.o=.d) $(HOBJS:.o=.d))
...@@ -58,7 +58,7 @@ $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver $(DEP_LIBS) ...@@ -58,7 +58,7 @@ $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver $(DEP_LIBS)
clean:: clean::
$(RM) $(addprefix $(SUBDIR),*-example$(EXESUF) *-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \ $(RM) $(addprefix $(SUBDIR),*-example$(EXESUF) *-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
distclean:: clean distclean:: clean
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment