Subject: Re: check_DESTDIR again..
To: None <current-users@netbsd.org>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: current-users
Date: 03/18/2002 18:35:15
On Sat, Mar 16, 2002 at 07:54:15PM +0000, Patrick Welche wrote:
> cd /usr/src/etc
> make -n DESTDIR=/ distrib-dirs
>
> On i386, all OK. On acorn32,
>
> make: don't know how to make check_DESTDIR. Stop
>
> Yet, both use the same nfs exported /usr/src, and did remake make, and
> install /usr/share/mk on the acorn32 - afterall check_DESTDIR is now
> defined in bsd.own.mk, so I don't see what the difference is!
Answer: acorn32 has USETOOLS=no. Trying on i386 with USETOOLS=no gives the
same error => all builds with USETOOLS=no fail as check_DESTDIR is not
defined in .ALLTARGETS, yet all builds look for check_DESTDIR.
It turns out this is because of a cunningly hidden .endif in bsd.own.mk, and
the following patch seems to fix it:
Index: bsd.own.mk
===================================================================
RCS file: /cvsroot/sharesrc/share/mk/bsd.own.mk,v
retrieving revision 1.273
diff -p -r1.273 bsd.own.mk
*** bsd.own.mk 2002/03/09 15:17:45 1.273
--- bsd.own.mk 2002/03/18 18:20:20
*************** UUDECODE= ${TOOLDIR}/bin/nbuudecode
*** 146,151 ****
--- 146,157 ----
YACC= ${TOOLDIR}/bin/nbyacc
ZIC= ${TOOLDIR}/bin/nbzic
+ # Make sure DESTDIR is set, so that builds with these tools always
+ # get appropriate -nostdinc, -nostdlib, etc. handling. The default is
+ # <empty string>, meaning start from /, the root directory.
+ DESTDIR?=
+ .endif
+
# Targets to check if DESTDIR or RELEASEDIR is provided
#
*************** check_RELEASEDIR: .PHONY .NOTMAIN
*** 169,180 ****
.endif
.endif
-
- # Make sure DESTDIR is set, so that builds with these tools always
- # get appropriate -nostdinc, -nostdlib, etc. handling. The default is
- # <empty string>, meaning start from /, the root directory.
- DESTDIR?=
- .endif
# Defining `SKEY' causes support for S/key authentication to be compiled in.
SKEY= yes
--- 175,180 ----