CONFIG_* defines
Rob Landley
rob at landley.net
Mon Sep 5 19:48:53 UTC 2005
On Monday 05 September 2005 05:30, Vladimir N. Oleynik wrote:
> Hi, all.
>
> The Busybox has an old problem.
> after any usage make config, may be change FEATURE_* only
> 1) recompiling applets/* always, but may be not require
> 2) do not recompile applets, used this feature
Our makefile dependencies suck. Not only does it tend to rebuild unnecessary
stuff, but if you don't do a "make clean" what you need may not be rebuilt.
(Go into tar and toggle something like "long options" or support for old tar
format. Now do a make. Notice that tar.c does not get rebuilt...)
> My idea:
> 1) use namespace as "[A-Z]+_[A-Z]+=y" for applet`s name only
> 2) for features use namespace as:
> 2a) for global feature
> "BB_FEATURE_NAME"
> 2b) for one applet
> "APPLET_FEATURE_NAME"
>
> or any English-like namespace with 3 or many "_", help me with this.
>
> After such changes, can be write an internal configurator will much easier.
> (sh+grep+uniq + rm applet.o)
Right now everything in the world includes libbb.h which includes config.h
which changes when you run menuconfig, so in theory it should pretty much
build all every time we touch anything. In reality, it doesn't.
Having a CONFIG_APPLETNAME_FEATURENAME hierarchy does make sense from a
general cleanliness perspective (and I think we're mostly doing that now).
I'm not quite seeing how you plan to use it to make incremental builds
reliable. (And incremental builds being _almost_ reliable is probably worse
than the current "just always make clean" approach, since almost leads to
_subtle_ bugs...)
How did the linux-kernel guys deal with this?
Rob
More information about the busybox
mailing list