diff options
author | jlam <jlam> | 2002-11-01 06:29:23 +0000 |
---|---|---|
committer | jlam <jlam> | 2002-11-01 06:29:23 +0000 |
commit | c7974a201e65d7c51aaca527aff0bbf27788780b (patch) | |
tree | 74e3bf9c7a7d1947ab823217ecca997956d4005f /mk/bsd.prefs.mk | |
parent | 1c8411bebcf4ef6a07bd0da470034c0a19c0486d (diff) | |
download | pkgsrc-c7974a201e65d7c51aaca527aff0bbf27788780b.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.
Diffstat (limited to 'mk/bsd.prefs.mk')
-rw-r--r-- | mk/bsd.prefs.mk | 4 |
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 |