Subject: Re: bmake and bootstrap and own.mk and MKCONF
To: Simon J. Gerraty <sjg@crufty.net>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 09/22/2005 17:24:12
On Mon, 19 Sep 2005, Simon J. Gerraty wrote:
> mk/install-mk FORCE_BSD_MK=yes /tmp/mk
> That sounds like FORCE_BSD_MK is set to ln or cp.
Yes, that is what I was trying. I overlooked the "If set to any other
non-empty" documentation.
My next problem is that I didn't have any sys.mk created. I need it. The
system's native /usr/share/mk/sys.mk defines X11BASE early so it doesn't
get set later:
X11BASE ?= /usr/X11R6
So this is what I have in bootstrap script:
echo_msg "Installing mk-files"
copy_src ../devel/mk-files/files mk-files
run_cmd "$sedprog -e 's|@SYSCONFDIR@|'$sysconfdir'|g'
$wrkdir/mk-files/own.mk.in > $wrkdir/mk-files/own.mk"
run_cmd "$wrkdir/mk-files/install-mk -v USE_SYS_MK=$opsys FORCE_BSD_MK=yes
$prefix/share/mk"
if [ ! -f $prefix/share/mk/sys.mk ]; then
ln -s Generic.sys.mk $prefix/share/mk/sys.mk
fi
I create the symlink above because my $opsys.sys.mk does not exist.
But for some reason my /usr/share/mk/sys.mk is still being used. I assume
the following is the order:
pkgbox# strings `which bmake` | grep /mk:
/usr/pkg/share/mk:/usr/share/mk:/usr/local/share/mk:/opt/share/mk
See my problem here in the pkgsrc/x11/xorg-libs directory (X11_TYPE is
xorg):
pkgbox# mv /usr/share/mk/sys.mk /usr/share/mk/sys.mk-moved
pkgbox# bmake show-var VARNAME=unix
We run DragonFly.
pkgbox# bmake show-var VARNAME=X11BASE
/usr/pkg/xorg
pkgbox# mv /usr/share/mk/sys.mk-moved /usr/share/mk/sys.mk
pkgbox# bmake show-var VARNAME=X11BASE
/usr/X11R6
I look in the debugging output and see:
Global:delete .PARSEDIR
Global:delete .PARSEFILE
Global:MAKEFILE = /usr/share/mk/sys.mk
Global:.PARSEDIR = /usr/share/mk
Global:.PARSEFILE = sys.mk
I am hoping that it should not use that. Before those lines it
does use /usr/pkg/share/mk.
I guess it is caused by:
Caching /usr/pkg/share/mk ...done
Caching /usr/share/mk ...done
Caching /usr/local/share/mk ...done
Caching /opt/share/mk ...done
Expanding "sys.mk"... /usr/pkg/share/mk/sys.mk /usr/share/mk/sys.mk
Now I need to look at the other bootstrap way to see what mk files are
different or how bmake is different.
Jeremy C. Reed
technical support & remote administration
http://www.pugetsoundtechnology.com/