/usr/local/share/mk ?

Kris Kennaway kris at obsecurity.org
Thu Feb 1 20:42:05 UTC 2007

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

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".


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

More information about the freebsd-ports mailing list