diff options
author | joerg <joerg@pkgsrc.org> | 2006-10-09 11:44:06 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2006-10-09 11:44:06 +0000 |
commit | babbde3ec9524e21af8d44abe5e83f60b672567c (patch) | |
tree | 81c92137461e47b6011bb2bbce71f9efb874c327 /mk/bsd.pkg.clean.mk | |
parent | 93456c4572310b5d58a21a6b0f722b812599f7be (diff) | |
download | pkgsrc-babbde3ec9524e21af8d44abe5e83f60b672567c.tar.gz |
Add two variables to control whether make package and make clean
are run with elevated privileges. Remove MAKE_PACKAGE_AS_ROOT
for now, since it is not sure whether the functionality in the current
form will stay and developers should spend time on the destdir support
instead.
Diffstat (limited to 'mk/bsd.pkg.clean.mk')
-rw-r--r-- | mk/bsd.pkg.clean.mk | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mk/bsd.pkg.clean.mk b/mk/bsd.pkg.clean.mk index 567807a7d80..0dcd21cac0d 100644 --- a/mk/bsd.pkg.clean.mk +++ b/mk/bsd.pkg.clean.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.clean.mk,v 1.8 2006/08/09 15:31:01 jlam Exp $ +# $NetBSD: bsd.pkg.clean.mk,v 1.9 2006/10/09 11:44:06 joerg Exp $ # # This Makefile fragment is included to bsd.pkg.mk and defines the # relevant variables and targets for the "clean" phase. @@ -50,7 +50,14 @@ post-clean: .PHONY: do-clean .if !target(do-clean) -do-clean: +. if !empty(_MAKE_CLEAN_AS_ROOT:M[Yy][Ee][Ss]) +do-clean: su-target +. else +do-clean: su-do-clean +. endif +.endif + +su-do-clean: @${PHASE_MSG} "Cleaning for ${PKGNAME}" ${_PKG_SILENT}${_PKG_DEBUG} \ if ${TEST} -d ${WRKDIR:Q}; then \ @@ -65,7 +72,6 @@ do-clean: ${RMDIR} ${BUILD_DIR} 2>/dev/null || ${TRUE}; \ ${RM} -f ${WRKDIR_BASENAME} 2>/dev/null || ${TRUE} . endif -.endif _CLEAN_TARGETS+= pre-clean .if empty(CLEANDEPENDS:M[nN][oO]) |