Subject: Re: Sample mk.conf file for /etc?
To: BSD Current Users <>
From: Greg A. Woods <>
List: current-users
Date: 04/23/2000 22:57:54
[ On Sunday, April 23, 2000 at 21:22:25 (-0400), Andrew Brown wrote: ]
> Subject: Re: Sample mk.conf file for /etc?
> ># Although mk.conf _is_ for pkgsrc, it's probably a better idea to ship it
> ># within pkgsrc itself. It's not needed otherwise, right?
> >
> >mk.conf is NOT just for pkgsrc if it's in /etc.  It's for building any-
> >thing, really.  For example, I put the directives in there so that it
> >doesn't build profiling libs when I build my system (I use them so
> >infrequently...).
> it's not specifically for pkgsrc, no, but aren't most of the things it
> contains in there because of pkgsrc requiring so many knobs and
> buttons?

Things might start to make a lot more sense if one were to have a
default /etc/mk.conf that did something like what mine does at the end:

# pkgsrc things that are truly local to this host environment:
# (as opposed to the site-specific stuff in /usr/pkgsrc/mk)
PKGSRC_BASE=		/usr/pkgsrc
LOCALBASE=		/usr/pkg
DISTDIR=		/usr/pkgsrc/distfiles 

# if this host is binary-only, no-compiler but mounts /usr/src
# from a build machine for upgrades then uncomment the following
# to foil so you can do installs
# (note you'll have to install /usr/src/share/mk first too)
# (note2 you'll also either have to install system headers or remove
# .depends files because they far too agressively depend on installed
# system headers)

.if exists($(PKGSRC_BASE)/mk/mk.conf)
. include "$(PKGSRC_BASE)/mk/mk.conf"
.elif exists($(PKGSRC_BASE)/mk/mk.conf.example)
. include "$(PKGSRC_BASE)/mk/mk.conf.example"

							Greg A. Woods

+1 416 218-0098      VE3TCP      <>      <robohack!woods>
Planix, Inc. <>; Secrets of the Weird <>