[RFC] Updating busybox config/build system to match current kernel system

Bernhard Fischer rep.nop at aon.at
Sun Sep 3 11:14:03 UTC 2006


On Thu, Aug 31, 2006 at 04:14:56PM -0400, Rob Landley wrote:
>On Thursday 31 August 2006 1:38 pm, Paul Fox wrote:
>>  > 
>>  > I tried to replace our current makefiles and config system.
>> 
>> i've been having to skip a lot of messages lately.  can you enumerate
>> the reasons for replacing the current makefiles?  i didn't think
>> they were all that broken.
>> 
>> what problem is this solving?
>
>Well to start with, I've made scripts/bb_mkdep segfault on several occasions, 
>and it doesn't recalculate the dependencies until _after_ the build runs so 
>if you do something that changes the dependencies and rerun the build, the 
>build runs using the old dependencies.  (Plus when I make symlinks to busybox 
>in the testing directory and such, and then do a "make clean" which deletes 
>busybox, on the next build it dumps warnings about those symlinks not 
>pointing to anything even though they're not pointed to by anything in the 
>build system.  It's doing a find and processing every file it hits.  I've 
>made chroot environments in a subdir under busybox with proc and sys mounted 
>in them and if you run the build without cleaning up that subdirectory first 
>the dependency generator goes positively bananas when it hits those...)
>
>That's one thing.

In the below, i'm using these terms:
-) in-tree == create objfiles in srcdir
   e.g.: cd $SRC ; make ;
-) out-of-tree == build from outer directory to outer dir
   e.g.: cd $OBJ ; make -f $SRC/Makefile top_srcdir=$SRC ;
-) out-to-tree == build from srcdir to outer dir
   e.g.: cd $SRC ; make O=$OBJ/ ;

I usually compile out-of-tree for several reasons:
1) I can wipe my objdir that usually contains lots of .S and .i files
without loosing my local modifications since they reside elsewere.
2) Even if i create dangling links or an installation, mkdep looks for
stuff in below the top_srcdir and not the top_builddir.
3) I can diff -rN $SRC.orig $SRC without adding any interim .S,
.i nor .c files to the diff.

I didn't try lately if kbuild supports building out-of-tree by the
abovemention definition. IIRC it does support out-to-tree, though.

That said, if you are irritated by building in the srctree, Don't
do that then! It's trivial to do it right, if you refuse to do so it
much sounds like the infamous "Doctor, it hurts when i.." ;)




More information about the busybox mailing list