summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradrianp <adrianp@pkgsrc.org>2007-07-01 00:06:40 +0000
committeradrianp <adrianp@pkgsrc.org>2007-07-01 00:06:40 +0000
commit99287730ab97e88255b58cd7085ea3b774802459 (patch)
tree7ded93a59f0971f26fdb644ff51c6d51552d6019
parent8f77d0192dae5dbcd81ff4999c544feb5decdd17 (diff)
downloadpkgsrc-99287730ab97e88255b58cd7085ea3b774802459.tar.gz
Introduce PRIVILEGED_STAGE.
This can currently only be set to 'clean' which will result in a priveleged 'make clean' operation in case any package builds result in files under ${WRKSRC} that are owned by root. This is useful for certain packages e.g. python (on NetBSD) and ezm3 and possibly more.
-rw-r--r--mk/bsd.pkg.clean.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/mk/bsd.pkg.clean.mk b/mk/bsd.pkg.clean.mk
index 0dcd21cac0d..63b129028e1 100644
--- a/mk/bsd.pkg.clean.mk
+++ b/mk/bsd.pkg.clean.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.clean.mk,v 1.9 2006/10/09 11:44:06 joerg Exp $
+# $NetBSD: bsd.pkg.clean.mk,v 1.10 2007/07/01 00:06:40 adrianp Exp $
#
# This Makefile fragment is included to bsd.pkg.mk and defines the
# relevant variables and targets for the "clean" phase.
@@ -27,6 +27,10 @@
CLEANDEPENDS?= no
+.if defined(PRIVILEGED_STAGE) && !empty(PRIVILEGED_STAGE:Mclean)
+_MAKE_CLEAN_AS_ROOT=yes
+.endif
+
.PHONY: clean-depends
clean-depends:
${_PKG_SILENT}${_PKG_DEBUG} \