Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Feb 2007 15:41:53 -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:  <20070201204153.GA74138@xor.obsecurity.org>
In-Reply-To: <20070201123026.C84181@xorpc.icir.org>
References:  <20070201111727.B83474@xorpc.icir.org> <20070201192051.GA72926@xor.obsecurity.org> <20070201113720.D83474@xorpc.icir.org> <20070201194417.GA73296@xor.obsecurity.org> <20070201123026.C84181@xorpc.icir.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 01, 2007 at 12:30:26PM -0800, Luigi Rizzo wrote:
> and to answer to your second point...
> On Thu, Feb 01, 2007 at 02:44:17PM -0500, Kris Kennaway wrote:
> > On Thu, Feb 01, 2007 at 11:37:20AM -0800, Luigi Rizzo wrote:
> ...
> > > 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.
> 
> the layout i see is this:
> 
>     in ports/multimedia/linux-ov-kld:	one of the linux-ported drivers
> 
> 	files/Makefile.kld
> 	files/patch-hopefully-empty
> 
> 	Makefile
> 	    ... fetch linux source
> 	    ... apply local patches
> 	    ... copy Makefile.kld into ${WRKSRC}
> 	    do-build:
> 		${MAKE} -I ${PREFIX}/share/mk -f Makefile.kld depend all
> 
> Again, if we could spare the -I ${PREFIX}/share/mk because it is already
> supplied once for all in the environment set in /usr/ports/Mk,
> that's less chance of making mistakes or hardwiring choices.
> 
> As for ports/devel/linux-bsd-kmod: it would install the bsd.linux_kmod.mk
> into ${PREFIX}/share/mk
> and then either add .PATH: /usr/local/share/mk to /etc/make.conf,
> or print a message asking the sysadmin to do so

OK, so you can do it the way I suggested instead without needing to
make those system changes just for the benefit of this single
application.

This is assuming that you plan to add many such drivers; when there
are only one or two consumers we don't put the common makefile into
/usr/ports/Mk but in some port directory which is included via
.include "${PORTSDIR}/foo".

Kris

P.S. "*-kmod" is the existing standard for kernel module ports, so
yours should be "linux-*-kmod".



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070201204153.GA74138>