Date: Thu, 1 Feb 2007 14:44:17 -0500 From: Kris Kennaway <kris@obsecurity.org> To: Luigi Rizzo <rizzo@icir.org> Cc: ports@freebsd.org, Kris Kennaway <kris@obsecurity.org> Subject: Re: /usr/local/share/mk ? Message-ID: <20070201194417.GA73296@xor.obsecurity.org> In-Reply-To: <20070201113720.D83474@xorpc.icir.org> References: <20070201111727.B83474@xorpc.icir.org> <20070201192051.GA72926@xor.obsecurity.org> <20070201113720.D83474@xorpc.icir.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <bsd.linux_kmod.mk> > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070201194417.GA73296>