confused about use of $(noconfig_targets)

Robert P. J. Day rpjday at mindspring.com
Thu Mar 2 15:55:42 UTC 2006


On Thu, 2 Mar 2006, Bernhard Fischer wrote:

> 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 :)

note:  i'm fine with the *philosophy* of the above, it's a fairly
straightforward technique.  i'm just not convinced of its
*implementation*.  specifically, what if you invoke the makefile with
mixed targets (some in that list, some not).  or is that just not
meant to happen?

> >  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.

so the above doesn't support multiple targets?  that's important to
know.  (for instance, if i did "make allbareconfig _all".  what
happens *then*?)

> >  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 \     <-- that would address my concern, yes
>         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.


rday



More information about the busybox mailing list