Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Dec 2008 16:25:22 +0100
From:      =?UTF-8?Q?Nikola_Kne=C5=BEevi=C4=87?= <laladelausanne@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: How to build kernel module spread on subdirectories?
Message-ID:  <6B2CC576-A295-4430-9CC9-B7FA7C276B6D@gmail.com>
In-Reply-To: <8663m269jt.fsf@ds4.des.no>
References:  <711D7381-D852-4B6B-991A-84BA6DEFB679@gmail.com> <49332E5C.9020303@freebsd.org> <D6756955-6E0B-429A-9216-2CF223D503D7@gmail.com> <200812011231.52262.fbsd.hackers@rachie.is-a-geek.net> <4934a886.x0zd2wiIrFlfIq2T%perryh@pluto.rain.com> <8663m269jt.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2 Dec 2008, at 13:33 , Dag-Erling Sm=F8rgrav wrote:

> perryh@pluto.rain.com writes:
>> <heresy> Provided the module in question is contemplated for delivery
>> as a port, rather than as part of the base -- so that having a build
>> dependency on a port is tolerable -- perhaps it would be more easily
>> built using devel/gmake? </heresy>
>
> You'd have to reproduce most of /usr/share/mk/*.mk in gmake syntax.

That was the main reason why I decided to switch to make :) I had =20
problems with CFLAGS set in that GNUmakefile, so I wanted to extract =20
CFLAGS used to build the rest of the kernel. And it works now, without =20=

any problems :)

To answer the other question in other email: yes, that file needs to =20
be generated, or I would need to regenerate it whenever I add a new =20
element... Which I may forget... So, this is what I ended up using:
<snip til the end>
.MAKEFILEDEPS: elements.mk

beforedepend: elements.mk

.if make(depend) && !exists(${.CURDIR}/elements.mk)
.warning "You should first generate elements.mk"
afterdepend:
         rm -f .depend
         $(MAKE) depend
.endif

.sinclude "elements.mk"
.include <bsd.kmod.mk>

Cheers,
Nikola=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6B2CC576-A295-4430-9CC9-B7FA7C276B6D>