summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2005-12-28 01:00:46 +0000
committerabs <abs@pkgsrc.org>2005-12-28 01:00:46 +0000
commit455007bd5db11dff3158c951dca6c60dd94a12cb (patch)
tree8dc115979d693e7b5bd405608efca7b13c27a954 /mk
parent291f8490efaedc75a5de3bbb43cc1dcf77908263 (diff)
downloadpkgsrc-455007bd5db11dff3158c951dca6c60dd94a12cb.tar.gz
Set PATH if not already set at the top of bsd.prefs.mk, just before
using it in a test to set _MAKE. With this change pkgsrc works on NetBSD/i386 3.0 to build with an empty environment (env -i sh). Tested with my ~100 favourite server packages. Does not affect the case when PATH is already set. To have a per OPSYS default path the include of platform/${OPSYS}.mk will probably need to be at the top of bsd.prefs.mk - arguably it should be there already. There are bound to be assumptions made by some packages which will be broken by an empty env, but the bulk of pkgsrc and in particular the infrastructure works fine.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.prefs.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 7ce0f0a6477..48d991f8e16 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.215 2005/12/05 22:07:07 rillig Exp $
+# $NetBSD: bsd.prefs.mk,v 1.216 2005/12/28 01:00:46 abs Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -18,6 +18,11 @@
BSD_PKG_MK=1
__PREFIX_SET__:=${PREFIX}
+# Set PATH if not already set
+.if !defined(PATH)
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+.endif
+
# Expand MAKE to a full path.
.if !defined(_MAKE)
_MAKE:= ${MAKE}