Subject: mk.conf and build.sh
To: None <netbsd-help@netbsd.org>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: netbsd-help
Date: 07/07/2004 11:29:51
If I set MKOBJDIRS=no or MKOBJ=no in /etc/mk.conf, and run build.sh, the
make obj pass happens. If I build.sh -o, it doesn't. With MKOBJDIRS set
to no in /etc/mk.conf, echoing the value of MKOBJDIRS in build.sh shows
it set to yes.
I'm confused because I thought build.sh just ended up doing a "make", which
would mean including bsd.own.mk, which would read MAKECONF (/etc/mk.conf).
It seems that
MAKEFLAGS="-de -m ${TOP}/share/mk ${MAKEFLAGS} MKOBJDIRS=${MKOBJDIRS-yes}"
export MAKEFLAGS MACHINE MACHINE_ARCH
in build.sh:parseoptions() overrides it, even though
# Normalise MKOBJDIRS, MKUNPRIVED, and MKUPDATE
# These may be set as build.sh options or in "mk.conf".
# Don't export them as they're only used for tests in build.sh.
#
MKOBJDIRS=$(getmakevar MKOBJDIRS)
looked promising in build.sh:validatemakeparams()
So, should I be able to prevent objdirs from being built during a
build.sh run by setting MKOBJDIRS=no in /etc/mk.conf?
If I set some other variable in /etc/mk.conf, which gets used in an altered
bsd.x11.mk, typing make in a src/x11 directory gets the desired result,
but in a build.sh -x run, it is all ignored. Is mk.conf is somehow
treated differently (ignored) when using mk.conf?
Cheers,
Patrick