/usr/local/share/mk ?

Luigi Rizzo rizzo at icir.org
Thu Feb 1 22:01:25 UTC 2007

On Thu, Feb 01, 2007 at 03:41:53PM -0500, Kris Kennaway wrote:
> 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:
> > > 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.

Consider that there might well be people who want to use the
linux-kmod-bsd stuff outside the ports tree, same as for any other
tool they install. So I think there are only two viable options
for places where ports/devel/linux-bsd-kmod installs its .mk file:

1. bsd.linux_kmod.mk is installed in /usr/share/mk/

2. bsd.linux_kmod.mk is installed in /usr/local/somewhere/else/
   and /etc/make.conf is modified (automatically or asking the
   sysadmin) adding a line

        .PATH: /usr/local/somewhere/else/

Both ways make the include available without extra arguments.

Other options don't seem to be as convenient:
putting it in /usr/ports/Mk makes it available [without extra args]
only within the ports, which is not enough.
And as far as i can tell /usr/src is not in the search path for .mk
files ; /usr/share/mk/bsd.kmod.mk does look in a few standard places
but only for conf/kmod.mk

All in all option #1 seems the best one, as it makes it
easier to add/remove the extra file when installing/deinstalling the port.

I am not a big fan of it because it touches the base system,
but if there is no better way, and this is the only instance, why not...

> This is assuming that you plan to add many such drivers; when there

yes i do. i especially hope others will follow up and we can get
better support for random hardware that 'works on linux'.

I just hated when i could not find a webcam that worked on
my system. Now 4 out of the six i have on my (messy) desk now
do work, and the other two aren't supported on linux either!

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

typo.. thanks. Speaking of names, what's best for the devel/ thing ?
linux-bsd-kmod looks like just another module. Should i call it
linux-kmod-compat or bsd-linux-kmod instead ?


More information about the freebsd-ports mailing list