From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 00:22:59 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 02E661065670 for ; Mon, 1 Dec 2008 00:22:59 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id CED7A8FC0A for ; Mon, 1 Dec 2008 00:22:58 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.178] (p53.kientzle.com [66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id mB10Mvtv096318; Sun, 30 Nov 2008 16:22:58 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <49332E5C.9020303@freebsd.org> Date: Sun, 30 Nov 2008 16:22:52 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?UTF-8?B?Tmlrb2xhIEtuZcW+ZXZpxIc=?= References: <711D7381-D852-4B6B-991A-84BA6DEFB679@gmail.com> <2A1A4C21-8A2D-4151-BCA0-5FAE1D3BBE86@gmail.com> <200811301843.28564.fbsd.hackers@rachie.is-a-geek.net> <94D09AB0-86B6-4D91-BD61-AB02A12CC260@gmail.com> In-Reply-To: <94D09AB0-86B6-4D91-BD61-AB02A12CC260@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: Mel , freebsd-hackers@freebsd.org 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: Mon, 01 Dec 2008 00:22:59 -0000 Nikola Knežević wrote: > As I described in my initial mail, I have to use two makefiles. One is > the main Makefile, while the other has to be generated. In the > generated .mk, I add to the SRCS, and I create the .PATH target with > other (necessary) directories. Unfortunately, make depend doesn't work > as it should be. > .MAKEFILEDEPS: elements.mk > > .sinclude "elements.mk" > .include > --->8--- > > When I run make depend, it only includes SRCSs from BSDmakefile, not > those from elements.mk. I would try adding a "beforedepend" requirement: beforedepend: elements.mk Look at /usr/share/mk/bsd.dep.mk, which has the 'make depend' logic. It supports optional "beforedepend" and "afterdepend" targets. Tim