confused about use of $(noconfig_targets)

Bernhard Fischer rep.nop at aon.at
Thu Mar 2 07:52:44 PST 2006


On Thu, Mar 02, 2006 at 09:28:49AM -0500, Robert P. J. Day wrote:
>
>  (ahead of time, i'll apologize for what will probably be some
>easy/pedantic questions since i've decided, once and for all, to go
>thru the BB code and figure out exactly how it works.)
>
>  in the top-level Rules.mak, there a conditional inclusion of the
>.config file:
>
>  ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
>  -include $(top_builddir)/.config
>  endif

This was already there before i touched any of busybox. Better ask an
elder :)
>
>  as i read that, as long as *none* of your goals is in the list of
>$(noconfig_targets), you'll include the .config file.  (i'm a little
>leery of that check in the first place, but that's not the issue
>here.)

Yes. If we're asked to do a noconfig_target, then don't pull in .config.
>
>  what if you just want to do a "make clean"?  in the latest check-in,
>the target "clean" was removed from $(noconfig_targets) so doing "make
>clean" would include .config.  why?  in what way does doing a clean

This was done so we'd rm the DO_INSTALL_LIB and the other lib*.so.*.
It could probably be removed:

I'm thinking about checking this in, fyi:
Index: Makefile
===================================================================
--- Makefile    (revision 14426)
+++ Makefile    (working copy)
@@ -10,6 +10,7 @@
 #--------------------------------------------------------------
 noconfig_targets := menuconfig config oldconfig randconfig \
        defconfig allyesconfig allnoconfig allbareconfig \
+       clean distclean \
        release tags
 
 # the toplevel sourcedir
@@ -100,7 +101,7 @@
 $(if $(wildcard $(PACKAGE_OUTPUTDIR)),, \
      $(error output directory "$(saved-output)" does not exist))
 
-.PHONY: $(MAKECMDGOALS)
+.PHONY: $(filter $(noconfig_targets),$(MAKECMDGOALS))
 
 $(PACKAGE_OUTPUTDIR)/Rules.mak:
        @echo > $@

The second hunk allows for doing a plain
make $(pwd)/coreutils/true.o
(in this case when building out of tree)

>require including the .config file?  just curious.




More information about the busybox mailing list