summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam>2002-11-01 06:29:23 +0000
committerjlam <jlam>2002-11-01 06:29:23 +0000
commit5e8e75623f3fc6c8fca46b012160a59eba9daccd (patch)
tree74e3bf9c7a7d1947ab823217ecca997956d4005f
parentc637795150d5a4cb93cd265db1d4ada1ab8f208f (diff)
downloadpkgsrc-5e8e75623f3fc6c8fca46b012160a59eba9daccd.tar.gz
When "make install" su's to root, su is invoked with the "-l" option, which
causes the shell environment to be discarded. This also discards OBJMACHINE or OBJHOSTNAME, which causes WRKDIR_BASENAME to be different between the "non-root" and "root" make targets and leads to the breakage seen in pkg/18879 by Simon Burge. Fix this by saving the OBJHOSTNAME or OBJMACHINE setting in MAKEFLAGS so that it is seen even after we "su -l" to root.
-rw-r--r--mk/bsd.prefs.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index aa3f237ced2..d93b4f7a765 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.88 2002/11/01 06:19:47 jlam Exp $
+# $NetBSD: bsd.prefs.mk,v 1.89 2002/11/01 06:29:23 jlam Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -302,8 +302,10 @@ _HOSTNAME!= ${UNAME} -n
MAKEFLAGS+= _HOSTNAME=${_HOSTNAME}
. endif
WRKDIR_BASENAME?= work.${_HOSTNAME:C|\..*||}
+MAKEFLAGS+= OBJHOSTNAME="${OBJHOSTNAME}"
.elif defined(OBJMACHINE)
WRKDIR_BASENAME?= work.${MACHINE_ARCH}
+MAKEFLAGS+= OBJMACHINE="${OBJMACHINE}"
.else
WRKDIR_BASENAME?= work
.endif