Subject: bmake and bootstrap and own.mk and MKCONF
To: None <sjg@crufty.net, tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 09/16/2005 12:56:43
So I have been testing having bootstrap pull in source from
devel/bmake/files and devel/mk-files/files. (On NetBSD, Linux and
DragonFly.)
I have a devel/mk-files/files/own.mk.in that is:
--- devel/mk-files/files/own.mk 2005-09-16 11:35:56.000000000 -0700
+++ devel/mk-files/files/own.mk.in 2005-09-15 23:33:54.000000000
-0700
@@ -5,8 +5,15 @@
.ifndef NOMAKECONF
+.if defined(MAKECONF) && exists(${MAKECONF})
+.include "${MAKECONF}"
+.elif exists(@SYSCONFDIR@/mk.conf)
+MAKECONF?= @SYSCONFDIR@/mk.conf
+.include "@SYSCONFDIR@/mk.conf"
+.elif exists(/etc/mk.conf)
MAKECONF?= /etc/mk.conf
-.-include "${MAKECONF}"
+.include "/etc/mk.conf"
+.endif
.endif
INSTALL?= install
And I use sed to define this.
When I do the install on Linux, the bsd.*.mk symlinks are made to
corresponding versions. And it appears to work.
But on NetBSD, the bsd.own.mk is not created -- as your comment in
install-mk says "if this is a BSD system the bsd.*.mk should exist and
be used."
This means that my custom mk.conf is not used -- like bootstrap told me:
Please copy work/mk.conf.example to /home/reed/etc/mk.conf.
It is not used. If I manually do:
ln -s ~/pkg/share/mk/own.mk ~/pkg/share/mk/bsd.own.mk
Then it works (it uses my /home/reed/etc/mk.conf).
What is the correct way on BSD systems that already have bsd.own.mk so
they will look at this predefined MAKECONF?
Also, the bootstrap way (as is in CVS) copies over a bunch of bsd.*.mk
files no matter what.
And they are not symlinks and doing diff shows they are different --
bsd.own.mk is different from own.mk. This does not seem correct.
Any ideas on this?
Any Solaris, AIX, other users who can test and work on this too? I can
make a tarball available to replace devel/bmake devel/mk-files and
bootstrap for testing.
Jeremy C. Reed
BSD News, BSD tutorials, BSD links
http://www.bsdnewsletter.com/