diff options
author | agc <agc> | 2002-01-11 14:41:41 +0000 |
---|---|---|
committer | agc <agc> | 2002-01-11 14:41:41 +0000 |
commit | f1a5e841b2c83a47eaa2c9d50a2d2d7ea3a7919b (patch) | |
tree | f2653b0d5569504d8d38bbf8f99713400173035d | |
parent | d242ff30a2e7bda5b40d19ec659eaa3599715757 (diff) | |
download | pkgsrc-f1a5e841b2c83a47eaa2c9d50a2d2d7ea3a7919b.tar.gz |
Add and document a new OBJHOSTNAME definition.
If set, the first component of the hostname (up to the first '.', if any),
will be appended to "work." to form the WRKDIR_BASENAME.
OBJHOSTNAME takes precedence over OBJMACHINE.
-rw-r--r-- | Packages.txt | 4 | ||||
-rw-r--r-- | mk/bsd.pkg.defaults.mk | 8 | ||||
-rw-r--r-- | mk/bsd.pkg.mk | 11 |
3 files changed, 18 insertions, 5 deletions
diff --git a/Packages.txt b/Packages.txt index bc97133193c..4a87e43da8d 100644 --- a/Packages.txt +++ b/Packages.txt @@ -1,4 +1,4 @@ -# $NetBSD: Packages.txt,v 1.225 2002/01/06 21:48:40 fredb Exp $ +# $NetBSD: Packages.txt,v 1.226 2002/01/11 14:41:41 agc Exp $ ########################################################################### ========================== @@ -365,7 +365,7 @@ policy: BATCH= yes # required for bulk builds DEPENDS_TARGET?= bulk-install PACKAGES?= ${_PKGSRCDIR}/packages/${MACHINE_ARCH} - OBJMACHINE?= 1 # use work.${MACHINE_ARCH} + OBJHOST?= yes # use work.`hostname` WRKOBJDIR?= /usr/tmp/pkgsrc # build here instead of in pkgsrc FAILOVER_FETCH= yes # insist on the correct checksum PKG_DEVELOPER?= yes diff --git a/mk/bsd.pkg.defaults.mk b/mk/bsd.pkg.defaults.mk index c79eb552345..3fae30d90f2 100644 --- a/mk/bsd.pkg.defaults.mk +++ b/mk/bsd.pkg.defaults.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.defaults.mk,v 1.31 2002/01/09 23:13:11 seb Exp $ +# $NetBSD: bsd.pkg.defaults.mk,v 1.32 2002/01/11 14:41:42 agc Exp $ # # A file providing defaults for pkgsrc and the packages collection. @@ -20,6 +20,12 @@ # Possible: not defined, no # Default: yes +#OBJHOSTNAME= +# use hostname-specific object directories, e.g. work.amnesiac, work.localhost +# OBJHOSTNAME takes precedence over OBJMACHINE (see below). +# Possible: defined, not defined +# Default: not defined + #OBJMACHINE= # use machine-specific object directories, e.g. work.i386, work.sparc # Possible: defined, not defined diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 91e2715d342..0baba62f28a 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.900 2002/01/10 02:51:30 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.901 2002/01/11 14:41:42 agc Exp $ # # This file is in the public domain. # @@ -425,8 +425,15 @@ BUILD_DIR?= ${WRKOBJDIR}/${PKGPATH} BUILD_DIR?= ${.CURDIR} .endif # WRKOBJDIR +# If OBJHOSTNAME is set, use first component of hostname in directory name # If OBJMACHINE is set, use ${MACHINE_ARCH} in the working directory name -.ifdef OBJMACHINE +.if defined(OBJHOSTNAME) +. if !defined(_HOSTNAME) +_HOSTNAME!= ${UNAME} -n +MAKEFLAGS+= _HOSTNAME=${_HOSTNAME} +. endif +WRKDIR_BASENAME?= work.${_HOSTNAME:C|\..*||} +.elif defined(OBJMACHINE) WRKDIR_BASENAME?= work.${MACHINE_ARCH} .else WRKDIR_BASENAME?= work |