Subject: Re: remaining make / *.mk problem
To: None <current-users@NetBSD.ORG>
From: Matthias Drochner <drochner@zelux6.zel.kfa-juelich.de>
List: current-users
Date: 05/15/1997 19:44:55
Excerpts from netbsd: 15-May-97 remaining make / *.mk problem Matthias
Drochner@??? (158)

> "make install" fails in share/tmac
> (trying ln <not-yet-installed> xxx)
> because "linksinstall" is tried before "filesinstall"

[followup to my own post]

perhaps some background:
I'm trying to build -current on a system which was current at
beginning of april. I use the DESTDIR option and an OBJDIR,
I want the host system to be kept intact.
(In other setups, the problem might not appear because the file to
link to is already present.)
Toggling the .include bsd.{links|files}.mk lines in
share/mk/bsd.prog.mk helps.

However, if one wants to compile into a DESTDIR, another
problem shows up if the make makros have changed: The
new macros have to be used. (And the new "make" anyway.)
This is done by a -m /newdir/usr/share/mk option to "make".
Unfortunately, this option is not propagated to sub-makes.

I recommend the following:
1. toggle the 2 include lines in share/mk/bsd.prog.mk.
2. change all calls to sub-makes from ${MAKE} to
	"${MAKE} ${MAKEFLAGS}"

It would be even cleaner if SOURCEROOT/Makefile would
explicitely use the new make (in DESTDIR/usr/bin) with the
new macros (ie, -m DESTDIR/usr/share/mk) after both are
installed in the "build" target. (and analogous at the other
places)

best regards
Matthias Drochner