Subject: Re: bmake and bootstrap and and MKCONF
To: Simon J. Gerraty <>
From: Jeremy C. Reed <>
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 created. I need it. The 
system's native /usr/share/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/ > $wrkdir/mk-files/"

run_cmd "$wrkdir/mk-files/install-mk -v USE_SYS_MK=$opsys FORCE_BSD_MK=yes 

if [ ! -f $prefix/share/mk/ ]; then
   ln -s $prefix/share/mk/

I create the symlink above because my $ does not exist.

But for some reason my /usr/share/mk/ is still being used. I assume 
the following is the order:

pkgbox# strings `which bmake` | grep /mk:

See my problem here in the pkgsrc/x11/xorg-libs directory (X11_TYPE is 

pkgbox# mv /usr/share/mk/ /usr/share/mk/

pkgbox# bmake show-var VARNAME=unix
We run DragonFly.

pkgbox# bmake show-var VARNAME=X11BASE

pkgbox# mv /usr/share/mk/ /usr/share/mk/

pkgbox# bmake show-var VARNAME=X11BASE

I look in the debugging output and see:

Global:delete .PARSEDIR
Global:delete .PARSEFILE
Global:MAKEFILE = /usr/share/mk/
Global:.PARSEDIR = /usr/share/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 ""... /usr/pkg/share/mk/ /usr/share/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