From owner-freebsd-ports@FreeBSD.ORG Thu Feb 1 19:37:22 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 76F1C16A406 for ; Thu, 1 Feb 2007 19:37:22 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.freebsd.org (Postfix) with ESMTP id 5B38D13C4B8 for ; Thu, 1 Feb 2007 19:37:22 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.13.6) with ESMTP id l11JbKrU084129; Thu, 1 Feb 2007 11:37:20 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id l11JbKGj084128; Thu, 1 Feb 2007 11:37:20 -0800 (PST) (envelope-from rizzo) Date: Thu, 1 Feb 2007 11:37:20 -0800 From: Luigi Rizzo To: Kris Kennaway Message-ID: <20070201113720.D83474@xorpc.icir.org> References: <20070201111727.B83474@xorpc.icir.org> <20070201192051.GA72926@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20070201192051.GA72926@xor.obsecurity.org>; from kris@obsecurity.org on Thu, Feb 01, 2007 at 02:20:51PM -0500 Cc: ports@freebsd.org 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:37:22 -0000 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. 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 ? cheers luigi