aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorMax Khon <fjoe@FreeBSD.org>2003-07-30 08:53:49 +0000
committerMax Khon <fjoe@FreeBSD.org>2003-07-30 08:53:49 +0000
commit358875200d6f0a1971e66d4531945cce0797bc06 (patch)
tree1a70ba43a5e265ba48201677b8e487074e4753f7 /Mk
parent114db71bc7c0416756bbc199762614229ccd0f41 (diff)
downloadports-358875200d6f0a1971e66d4531945cce0797bc06.tar.gz
ports-358875200d6f0a1971e66d4531945cce0797bc06.zip
Convert ${SU} to ${SU_CMD}. This allows to use sudo instead of su
by defining 'SU_CMD=/usr/local/bin/sudo sh -c'. Provide an example of using sudo instead of su as well. Approved by: kris, des
Notes
Notes: svn path=/head/; revision=85905
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 06dd008ace08..0846d16c42da 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -795,7 +795,8 @@ SED?= /usr/bin/sed
SETENV?= /usr/bin/env
SH?= /bin/sh
STRIP_CMD?= /usr/bin/strip
-SU?= /usr/bin/su
+SU_CMD?= /usr/bin/su root -c
+#SU_CMD?= /usr/local/bin/sudo su -c
TAIL?= /usr/bin/tail
TEST?= test # Shell builtin
TR?= /usr/bin/tr
@@ -3258,7 +3259,7 @@ ${${target:U}_COOKIE}: ${_${target:U}_DEP} ${_${target:U}_SEQ}
.endif
@echo "===> Switching to root credentials for '${target}' target"
@cd ${.CURDIR} && \
- ${SU} root -c "${MAKE} ${__softMAKEFLAGS} ${_${target:U}_SUSEQ}"
+ ${SU_CMD} "${MAKE} ${__softMAKEFLAGS} ${_${target:U}_SUSEQ}"
@echo "===> Returning to user credentials"
@${TOUCH} ${TOUCH_FLAGS} ${.TARGET}
.elif defined(USE_SUBMAKE)