Makefile: fixup make distclean after kconfig build in BUILD_DIR
authorPeter Korsgaard <jacmet@sunsite.dk>
Thu, 1 Jul 2010 07:03:36 +0000 (09:03 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 1 Jul 2010 07:03:36 +0000 (09:03 +0200)
We don't actually need to explicitly clean the kconfig stuff, as distclean
already removes the entire BUILD_DIR, but fix up the packag/config makefile
to do the right thing if make clean/distclean is called manually for
completeness.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Makefile
package/config/Makefile

index cdd16a2cb7b3b015c23a486048d4300b10239212..df276c11bbef3cef67ac7f7706f8918f0a7714b7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -578,7 +578,6 @@ ifeq ($(O),output)
        rm -rf $(O)
 endif
        rm -rf $(CONFIG_DIR)/.config $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/.config.cmd $(CONFIG_DIR)/.auto.deps
-       -$(MAKE) -C $(CONFIG) distclean
 
 flush:
        rm -f $(BUILD_DIR)/tgt-config.cache
index f0a030f80934a6209544e36e503e10b00a4d94d5..2b266b87252b6f0d37fd5043785e69572efaed63 100644 (file)
@@ -2,6 +2,7 @@ src := .
 top_srcdir=../../
 top_builddir=../../
 srctree := .
+obj ?= .
 
 include Makefile.kconfig
 #HOSTCFLAGS+=-Dinline="" -include foo.h
@@ -42,11 +43,11 @@ $(obj)/%:: $(src)/%_shipped
        $(Q)cat $< > $@
 
 clean:
-       $(Q)rm -f $(clean-files)
+       $(Q)rm -f $(addprefix $(obj)/,$(clean-files))
 distclean: clean
-       $(Q)rm -f $(lxdialog) $(conf-objs) $(mconf-objs) $(kxgettext-objs) \
+       $(Q)rm -f $(addprefix $(obj)/,$(lxdialog) $(conf-objs) $(mconf-objs) $(kxgettext-objs) \
                $(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \
-               mconf .depend
+               mconf .depend)
 
 FORCE:
 .PHONY: FORCE clean distclean