Subject: Re: bmake and bootstrap and and MKCONF
To: Jeremy C. Reed <>
From: Simon J. Gerraty <>
List: tech-pkg
Date: 09/16/2005 20:21:01
Thanks for looking at this btw.
>But on NetBSD, the is not created -- as your comment in 
>install-mk says "if this is a BSD system the bsd.*.mk should exist and 
>be used."

If you look at install-mk you'll see

#       FORCE_BSD_MK:
#               By default if bsd.*.mk exist in the standard location,
#               they are used there and not provided in "dest".
#               If set to 'cp' or 'ln' the standard bsd.*.mk are
#               replicated to "dest".  If set to any other non-empty
#               value, or if no bsd.*.mk exist in a standard location
#               the generic et al are symlinked to bsd.*.mk

but I generally think it is a better idea to leave bsd.*.mk alone on
such systems.  If you have a set of *.mk specific to your project, I'd
put them in pkgsrc/mk 
If want to get fancy you can even have:

and put a generic in pkgsrc/mk that works out what the target
system is and pulls in appropriate guff from $OS if needed.  That way
the tree works even when shared via NFS on different systems.
See the for an example.

>What is the correct way on BSD systems that already have so 
>they will look at this predefined MAKECONF?

Can't you just set MAKECONF in the environment and have the system suck it in? 

FWIW I get a _lot_ of mileage from using a simple wrapper script for
make.  We use it here (and I can contribute it if there's interest).
We find it especially useful, when engineers are working on multiple
branches at once and want M-x compile to "just work" for the tree they
happen to be in - which may require a different set of *.mk etc.

>Also, the bootstrap way (as is in CVS) copies over a bunch of bsd.*.mk 
>files no matter what.

You can do that by setting FORCE_BSD_MK=cp

>And they are not symlinks and doing diff shows they are different -- 
> is different from This does not seem correct.

I'm not sure I followed, if FORCE_BSD_MK is set to cp (or ln) then
install-mk will make dest/bsd.*.mk copies or pointers to the ones in
If that isn't what you want (eg if you want to force dest/
to be then just setting FORCE_BSD_MK=yes will do that (IIRC).

Hope that helps.