Source-Changes-HG archive

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

[src/trunk]: src/share/mk Snapshot of some things for builds as non-root -- w...



details:   https://anonhg.NetBSD.org/src/rev/0c9e8e384a25
branches:  trunk
changeset: 517776:0c9e8e384a25
user:      perry <perry%NetBSD.org@localhost>
date:      Mon Nov 19 04:44:32 2001 +0000

description:
Snapshot of some things for builds as non-root -- work in progress:

0) rename UNPRIVILEGED UNPRIVED. It was too long. We'll argue about if
   we should replace it with yet something else later. It currently
   logs metadata by default. We'll argue more about that later too.
1) create a _SRC_TOP_OBJ_ variable pointing at the /usr/src objdir so
   we know where to dump metadata.
2) Add a METALOG variable pointing at the default location for the
   metadata log. (This may be moved or renamed -- the location is just
   for testing.)
3) Add a HOST_INSTALL_FILE used in host tools Makefiles instead of
   INSTALL_FILE, which doesn't include ${INSTPRIV} (i.e -U -M ${METALOG})
4) Add INSTALL_LINK, INSTALL_SYMLINK for use in other .mk files so we
   can get rid of explicit uses of ln. Slightly clean up INSTALL_FILE.

diffstat:

 share/mk/bsd.own.mk |  32 ++++++++++++++++++++++----------
 1 files changed, 22 insertions(+), 10 deletions(-)

diffs (70 lines):

diff -r 42624a25f67a -r 0c9e8e384a25 share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk       Mon Nov 19 04:11:18 2001 +0000
+++ b/share/mk/bsd.own.mk       Mon Nov 19 04:44:32 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.own.mk,v 1.221 2001/11/19 02:46:50 thorpej Exp $
+#      $NetBSD: bsd.own.mk,v 1.222 2001/11/19 04:44:32 perry Exp $
 
 .if !defined(_BSD_OWN_MK_)
 _BSD_OWN_MK_=1
@@ -30,6 +30,12 @@
 CPPFLAG_ISYSTEM=       -idirafter
 .endif
 
+.if empty(.MAKEFLAGS:M-V*)
+PRINTOBJDIR=   ${MAKE} -V .OBJDIR
+.else
+PRINTOBJDIR=   echo # prevent infinite recursion
+.endif
+
 .if !defined(_SRC_TOP_)
 # Find the top of the source tree to see if we're inside of $BSDSRCDIR
 _SRC_TOP_!= cd ${.CURDIR}; while :; do \
@@ -41,6 +47,11 @@
 .MAKEOVERRIDES+=       _SRC_TOP_
 .endif
 
+.if !defined(_SRC_TOP_OBJ_)
+_SRC_TOP_OBJ_!=        cd ${_SRC_TOP_} && ${PRINTOBJDIR}
+.MAKEOVERRIDES+=       _SRC_TOP_OBJ_
+.endif
+
 .if (${_SRC_TOP_} != "") && defined(USE_NEW_TOOLCHAIN)
 USETOOLS?=     yes
 .endif
@@ -56,12 +67,6 @@
        @false
 .endif
 
-.if empty(.MAKEFLAGS:M-V*)
-PRINTOBJDIR=   ${MAKE} -V .OBJDIR
-.else
-PRINTOBJDIR=   echo # prevent infinite recursion
-.endif
-
 # Host platform information; may be overridden
 .if !defined(HOST_OSTYPE)
 _HOST_OSNAME!= uname -s
@@ -187,12 +192,19 @@
 COPY?=         -c
 PRESERVE?=     ${UPDATE:D-p}
 RENAME?=       -r
-INSTPRIV?=     ${UNPRIVILEGED:D-U}
+HRDLINK?=      -l h
+SYMLINK?=      -l s
+
+METALOG?=      ${_SRC_TOP_OBJ_}/METALOG
+INSTPRIV?=     ${UNPRIVED:D-U -M ${METALOG}}
 STRIPFLAG?=    -s
 
 .if ${NEED_OWN_INSTALL_TARGET} == "yes"
-INSTALL_DIR?=  ${INSTALL} ${INSTPRIV} -d
-INSTALL_FILE?= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME} ${INSTPRIV}
+INSTALL_DIR?=          ${INSTALL} ${INSTPRIV} -d
+INSTALL_FILE?=         ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME}
+INSTALL_LINK?=         ${INSTALL} ${INSTPRIV} ${HRDLINK}
+INSTALL_SYMLINK?=      ${INSTALL} ${INSTPRIV} ${SYMLINK}
+HOST_INSTALL_FILE?=    ${INSTALL} ${COPY} ${PRESERVE} ${RENAME}
 .endif
 
 # Define SYS_INCLUDE to indicate whether you want symbolic links to the system



Home | Main Index | Thread Index | Old Index