diff options
author | agc <agc@pkgsrc.org> | 2002-01-11 14:41:41 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2002-01-11 14:41:41 +0000 |
commit | cf3780e1c297bb9a22f17b6af3aaa92e4aea9e54 (patch) | |
tree | f2653b0d5569504d8d38bbf8f99713400173035d /mk | |
parent | 49851144675ecc64cb2499dade5133b96a866af0 (diff) | |
download | pkgsrc-cf3780e1c297bb9a22f17b6af3aaa92e4aea9e54.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.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.defaults.mk | 8 | ||||
-rw-r--r-- | mk/bsd.pkg.mk | 11 |
2 files changed, 16 insertions, 3 deletions
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 |