confused by libbb/Makefile

Bernhard Fischer rep.nop at aon.at
Sat May 13 12:01:53 UTC 2006


On Fri, May 12, 2006 at 05:38:03PM -0400, Robert P. J. Day wrote:
>On Fri, 12 May 2006, Peter S. Mazinger wrote:
>
>> On Fri, 12 May 2006, Robert P. J. Day wrote:
>>
>> >
>> >   i'm a bit baffled by libbb/Makefile:
>> >
>> > ==============================
>> > ...
>> > ifndef top_srcdir
>> > top_srcdir=..
>> > endif
>> > ifndef top_builddir
>> > top_builddir=..
>> > endif
>> > srcdir=$(top_srcdir)/libbb
>> > LIBBB_DIR:=./
>> > include $(top_builddir)/Rules.mak      <-- ???
>>
>> this is probably srcdir (as it does not change)
>>
>> > include $(top_builddir)/.config        <-- ???
>>
>> this is ok, because it is generated and you want to write to build
>> directory, not the source
>>
>> Peter
>
>ah, yes, you're right about the second one, i'm not sure what i was
>thinking there.  but the first one should definitely be srcdir.

Are you sure about that first one?

Use-case:
Building out of tree ¹) and ²), if you're not in the top_builddir but
in (let's say) coreutils.

With the buildsystem we have currently, there has to exist a Rules.mak
in the top build-dir. See?

If you don't break these two cases below and building in the tree also
works, then i'm not opposed if the first case would be change..

¹)
rm -rf /tmp/obj ; mkdir /tmp/obj ; cd /tmp/obj
make -f /src/busybox/Makefile top_srcdir=/src/busybox defconfig

²)
rm -rf /tmp/obj ; mkdir /tmp/obj ; cd /src/busybox
make defconfig O=/tmp/obj




More information about the busybox mailing list