From owner-freebsd-ports@FreeBSD.ORG Thu Feb 1 19:44:30 2007 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8008916A403 for ; Thu, 1 Feb 2007 19:44:30 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 74F2A13C481 for ; Thu, 1 Feb 2007 19:44:30 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 191071A4D87; Thu, 1 Feb 2007 11:44:30 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 86AC25195F; Thu, 1 Feb 2007 14:44:17 -0500 (EST) Date: Thu, 1 Feb 2007 14:44:17 -0500 From: Kris Kennaway To: Luigi Rizzo Message-ID: <20070201194417.GA73296@xor.obsecurity.org> References: <20070201111727.B83474@xorpc.icir.org> <20070201192051.GA72926@xor.obsecurity.org> <20070201113720.D83474@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070201113720.D83474@xorpc.icir.org> User-Agent: Mutt/1.4.2.2i Cc: ports@freebsd.org, Kris Kennaway Subject: Re: /usr/local/share/mk ? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2007 19:44:30 -0000 On Thu, Feb 01, 2007 at 11:37:20AM -0800, Luigi Rizzo wrote: > On Thu, Feb 01, 2007 at 02:20:51PM -0500, Kris Kennaway wrote: > > On Thu, Feb 01, 2007 at 11:17:27AM -0800, Luigi Rizzo wrote: > > > I have a port (the one mentioned in my previous msg) > > > which needs to install its own make's include file, > > > bsd.linux_kmod.mk , and I thought that there was > > > a system-wide place such as ${PREFIX}/share/mk > > > where the port could install the file in the first place, > > > and where make would look for it by default. > > > > > > But apparently i was wrong on both things... > > > Now maybe the extra search path can be set with some > > > system-wide option in /etc/make.conf (through .PATH ?) > > > but then the problem to settle on one a name > > > for /usr/local/share/mk remains... > > > > You're right that there is no support for this. Can you explain why > > you need it? > > The thing i am working on is an adaptation layer to build linux > device drivers on FreeBSD: > > http://info.iet.unipi.it/~luigi/FreeBSD/linux_bsd_kld.html > > When you want to adapt a linux driver, all you should do is grab the > linux sources, write a suitable Makefile.kld like this (this is a > real, working example!) > > .PATH: ${.CURDIR} # useless in this case > # sources for the linux driver > SRCS= ov511.c > KMOD=ov511 # module name > > KLINPATH=../linux_compat > .include <${KLINPATH}/bsd.linux_kmod.mk> > > and just do 'make -f Makefile.kld depend all" > > If bsd.linux_kmod.mk goes into a central place i'd rather not > have to remember to set KLINPATH but just write > > .include > > Now, this may well be a one-of-a-kind case calling for an ad-hoc > solution, but if all we need is accept to use ${PREFIX}/share/mk > for third-party .mk files, this seems a better way to handle > the problem. After >10 years you are apparently the first person to want such a feature, so this suggests the application is limited :) > In term of port's backward compatibilty, the extra .PATH or -I > could be supplied by the files in /usr/ports/Mk which people > are expected to update anyways, right ? That Makefile.kld would be a fragment of a port makefile, right? Your bsd.linux_kmod.mk could go in /usr/ports/Mk although it seems to make more sense as part of /usr/src. Kris