From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 15:25:27 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24AF6106576A for ; Tue, 2 Dec 2008 15:25:27 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.188]) by mx1.freebsd.org (Postfix) with ESMTP id 8D7038FC14 for ; Tue, 2 Dec 2008 15:25:26 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: by gv-out-0910.google.com with SMTP id n8so491033gve.39 for ; Tue, 02 Dec 2008 07:25:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=6MzbSP7VgncLgsmVwhNaZU+HtIptIsr3TrHZysHw9f8=; b=YNK21I4lwaJgGqQP23bAvwSXc2EOMFLdOEIww67SASTt/A9DJ/+6uZFqhcDe4DHPjQ s/bkAuiquheAzVl43g4SHAXhsmQHfrzXX97cb9PhXYhDpzX72CiyYtUmIifsuhdddWfs 7zqeaG0lO9yjD+m008BAcIJh3eSixnvxtQv3k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=Rbcb0BpLkyNYF0nSQVqMfKN92VTS3Vehq6PWej8gW4CUa2aEBKimjJyKi+vUS8pXtz AO9+vSUwgTt0g28TLsmfYo+aGEuXNRcJD1Di7wMiQE3tjPIt2wSRSQCzWSgbqVHFkHTJ EWFNDmtHZ1haME0NSuDXB6tRAy+Nr2x81FPbo= Received: by 10.86.59.18 with SMTP id h18mr7289567fga.42.1228231525235; Tue, 02 Dec 2008 07:25:25 -0800 (PST) Received: from nslpc5.epfl.ch (nslpc5.epfl.ch [128.178.149.20]) by mx.google.com with ESMTPS id 3sm1845714fge.41.2008.12.02.07.25.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 02 Dec 2008 07:25:24 -0800 (PST) Message-Id: <6B2CC576-A295-4430-9CC9-B7FA7C276B6D@gmail.com> From: =?UTF-8?Q?Nikola_Kne=C5=BEevi=C4=87?= To: freebsd-hackers@freebsd.org In-Reply-To: <8663m269jt.fsf@ds4.des.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v929.2) Date: Tue, 2 Dec 2008 16:25:22 +0100 References: <711D7381-D852-4B6B-991A-84BA6DEFB679@gmail.com> <49332E5C.9020303@freebsd.org> <200812011231.52262.fbsd.hackers@rachie.is-a-geek.net> <4934a886.x0zd2wiIrFlfIq2T%perryh@pluto.rain.com> <8663m269jt.fsf@ds4.des.no> X-Mailer: Apple Mail (2.929.2) Subject: Re: How to build kernel module spread on subdirectories? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2008 15:25:27 -0000 On 2 Dec 2008, at 13:33 , Dag-Erling Sm=F8rgrav wrote: > perryh@pluto.rain.com writes: >> 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? > > 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: .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 Cheers, Nikola=