pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Add variable to control whether the install target ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/48d515483a13
branches:  trunk
changeset: 519766:48d515483a13
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Oct 09 11:59:08 2006 +0000

description:
Add variable to control whether the install target is run as root.

diffstat:

 mk/bsd.prefs.mk       |  4 +++-
 mk/install/install.mk |  6 +++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 9e7a6b2d126f -r 48d515483a13 mk/bsd.prefs.mk
--- a/mk/bsd.prefs.mk   Mon Oct 09 11:54:11 2006 +0000
+++ b/mk/bsd.prefs.mk   Mon Oct 09 11:59:08 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.239 2006/10/09 11:44:06 joerg Exp $
+# $NetBSD: bsd.prefs.mk,v 1.240 2006/10/09 11:59:08 joerg Exp $
 #
 # Make file, included to get the site preferences, if any.  Should
 # only be included by package Makefiles before any .if defined()
@@ -328,6 +328,8 @@
 
 _MAKE_CLEAN_AS_ROOT?=  no
 # Whether to run the clean target as root.
+_MAKE_INSTALL_AS_ROOT?=        yes
+# Whether to run the install target as root.
 _MAKE_PACKAGE_AS_ROOT?=        yes
 # Whether to run the package target as root.
 
diff -r 9e7a6b2d126f -r 48d515483a13 mk/install/install.mk
--- a/mk/install/install.mk     Mon Oct 09 11:54:11 2006 +0000
+++ b/mk/install/install.mk     Mon Oct 09 11:59:08 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.20 2006/10/06 20:13:10 rillig Exp $
+# $NetBSD: install.mk,v 1.21 2006/10/09 11:59:08 joerg Exp $
 
 ######################################################################
 ### install (PUBLIC)
@@ -163,7 +163,11 @@
 .endif
 
 .PHONY: install-all su-install-all
+.  if !empty(_MAKE_INSTALL_AS_ROOT:M[Yy][Ee][Ss])
 install-all: su-target
+.  else
+install-all: su-install-all
+.  endif
 su-install-all: ${_INSTALL_ALL_TARGETS}
 
 ######################################################################



Home | Main Index | Thread Index | Old Index