NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: What is BSD make?



Aleksey Cheusov <cheusov%tut.by@localhost> writes:

>> 6. .OBJDIR
>
>> This is the most sophisticated part. Noone knows how it works exactly,
>
> IMHO it is documented good enough enough.

It isn't.

If it were so, it wouldn't be that hard to explain, how the stuff works,
my colleagues would've read it in the manual instead.

>> Object directory also complicates linking.
>> You cant simply write:
>
>> LDADD+= ../../lib/this/this.a
>> DPADD+= ../../lib/this/this.a
>
> Everything work just fine ;-)
>
> 0 dictd_bsd_make>cat dict/Makefile 
> PROG=           dict
>
> .include "../dict_common/Makefile.inc"
> .include "../libmaa/Makefile.inc"
> .include <bsd.prog.mk>
> 0 dictd_bsd_make>cat dict_common/Makefile.inc 
> LDFLAGS+=       -L../dict_common
> LDADD+=         -ldict_common

Now do the same, except link it statically.

Feel the difference.

> DPADD+=         ../dict_common/libdict_common.a

And, try it without setting MAKEOBJDIRPREFIX and running "make obj"
for the whole tree.
Don't create objdir for "dict" and create it for "dict_common".
This is valid usage, but your build fails.

>> 3. Recursive makes.
>
> I personally don't beleive in "Recursive make considered harmful" by
> Peter Miller. Most of those problems can easily be solved using bmake.

Now tell us, how are you going to build those libraries you depend on
without calling recursive make?
How are you going to pass flags to you recursive make?

>> I have absolutely no idea how to handle recursive makes right now.
> Natively with bsd.subdir.mk?

You don't understand the problem.


-- 
HE CE3OH...



Home | Main Index | Thread Index | Old Index