Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jun 2012 23:15:56 +0000 (UTC)
From:      "David E. O'Brien" <obrien@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r237612 - head/share/mk
Message-ID:  <201206262315.q5QNFuSD067914@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: obrien
Date: Tue Jun 26 23:15:55 2012
New Revision: 237612
URL: http://svn.freebsd.org/changeset/base/237612

Log:
  Add -DWITH_INSTALL_AS_USER to the source build (naming matches the
  same functionality of The Ports Collection).
  This sets BINOWN, BINGRP, etc... to match current user.  This this
  allows 'install', as used in 'make install', to succeed (assuming
  user has write permissions).
  
  Submitted by:	Simon J Gerraty <sjg@juniper.net>
  Discussed on:	freebsd-arch

Modified:
  head/share/mk/bsd.own.mk

Modified: head/share/mk/bsd.own.mk
==============================================================================
--- head/share/mk/bsd.own.mk	Tue Jun 26 22:16:53 2012	(r237611)
+++ head/share/mk/bsd.own.mk	Tue Jun 26 23:15:55 2012	(r237612)
@@ -427,6 +427,7 @@ __DEFAULT_NO_OPTIONS = \
     HESIOD \
     ICONV \
     IDEA \
+    INSTALL_AS_USER \
     LIBCPLUSPLUS \
     NAND \
     OFED \
@@ -645,6 +646,17 @@ CTFCONVERT_CMD=
 CTFCONVERT_CMD=	@:
 .endif 
 
+.if ${MK_INSTALL_AS_USER} != "no"
+_uid!=	id -un
+.if ${_uid} != 0
+_gid!=	id -gn
+.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE
+$xOWN=	${_uid}
+$xGRP=	${_gid}
+.endfor
+.endif
+.endif
+
 .endif # !_WITHOUT_SRCCONF
 
 .endif	# !target(__<bsd.own.mk>__)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206262315.q5QNFuSD067914>