Subject: Re: bmake and bootstrap and own.mk and MKCONF
To: Jeremy C. Reed <reed@reedmedia.net>
From: Simon J. Gerraty <sjg@crufty.net>
List: tech-pkg
Date: 09/19/2005 10:24:42
On Sat, 17 Sep 2005 15:55:44 -0700 (PDT), "Jeremy C. Reed" writes:
>When I used that a couple days ago I had this problem on on NetBSD:
>
>CC="gcc" MAKEFLAGS= 
>MAKESYSPATH=`pwd`/mk:/usr/local/pkgsrc/bootstrap/work/mk-fil
>es:/home/reed/pkg/share/mk:/usr/share/mk:/usr/local/share/mk:/opt/share/mk
>./bmake.boot -f Makefile
>bmake.boot: "/usr/share/mk/bsd.shlib.mk" line 6: Malformed conditional
>(${MKDYNAMICROOT} == "no")
>...
>
>On NetBSD, it appears that /usr/share/mk/bsd.prog.mk got in the way
>and was used to bring in bsd.shlib.mk which failed.

I don't see how.  If I run:

mk/install-mk FORCE_BSD_MK=yes /tmp/mk

I get:

lrwxr-xr-x  1 sjg  wheel      6 Sep 19 10:14 bsd.dep.mk@ -> dep.mk
lrwxr-xr-x  1 sjg  wheel      6 Sep 19 10:14 bsd.doc.mk@ -> doc.mk
lrwxr-xr-x  1 sjg  wheel      7 Sep 19 10:14 bsd.init.mk@ -> init.mk
lrwxr-xr-x  1 sjg  wheel      6 Sep 19 10:14 bsd.lib.mk@ -> lib.mk
lrwxr-xr-x  1 sjg  wheel      6 Sep 19 10:14 bsd.man.mk@ -> man.mk
lrwxr-xr-x  1 sjg  wheel      6 Sep 19 10:14 bsd.nls.mk@ -> nls.mk
lrwxr-xr-x  1 sjg  wheel      6 Sep 19 10:14 bsd.obj.mk@ -> obj.mk
lrwxr-xr-x  1 sjg  wheel      6 Sep 19 10:14 bsd.own.mk@ -> own.mk
lrwxr-xr-x  1 sjg  wheel      7 Sep 19 10:14 bsd.prog.mk@ -> prog.mk
lrwxr-xr-x  1 sjg  wheel      9 Sep 19 10:14 bsd.subdir.mk@ -> subdir.mk

whereas FORCE_BSD_MK=ln gives symlinks to /usr/share/mk/bsd.* 
and FORCE_BSD_MK=cp gives copies of them.

Can you run with -dx and run install-mk with sh -x  and show me the
results?

>It seems like my /usr/local/pkgsrc/bootstrap/work/bmake/NetBSD/mk/prog.mk
>or /usr/local/pkgsrc/bootstrap/work/mk-files/prog.mk should have been
>used during this bootstrapping (they are identical). If I use one of 
>them instead, then bootstrap continues.

Without knowing the commands you are running I cannot answer.

>I just meant that the current bootstrap is installing different versions 
>of both bsd.own.mk and own.mk files on some platforms.

That sounds like FORCE_BSD_MK is set to ln or cp.

--sjg