Subject: Re: /etc/mk.conf problems
To: None <netbsd-help@netbsd.org>
From: Amitai Schlair <schmonz@schmonz.com>
List: netbsd-help
Date: 12/13/2001 18:40:48
Richard Rauch wrote:

> Good point...  Still, since make uses /etc/mk.conf, you could contnue
to
> stuff the variables in there if you wanted.  It just seems to me that
an
> /etc file is not really the best place for pkgsrc configuration.
> (Especially since most packages get _their_ configuration/etc.
isolated
> into /usr/pkg/ by the pkgsrc system.)

When you're in pkgsrc, <bsd.prefs.mk> sets BSD_PKG_MK. You can branch on
this. Try it:

# cat >> /etc/mk.conf
.ifdef BSD_PKG_MK
WHEREAMI=pkgsrc
.else
WHEREAMI=not-pkgsrc
.endif
^D
# cd /usr/pkgsrc && make -V WHEREAMI
pkgsrc
# cd /sys && make -V WHEREAMI
not-pkgsrc

So you can put things in /etc/mk.conf that only get used by pkgsrc. Does
that solve the problem here?

- Amitai