summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2010-08-30 06:21:49 +0000
committerobache <obache@pkgsrc.org>2010-08-30 06:21:49 +0000
commit6b5d180696788f862932b2de2a08418318188d34 (patch)
tree176e47891926a3892efc8e8ef060775c7755c091 /bootstrap
parentd6591ff1b928234d5b65c64da7fa748f1446e732 (diff)
downloadpkgsrc-6b5d180696788f862932b2de2a08418318188d34.tar.gz
Set WRKOBJDIR=${workdir}/pkgsrc to target mk.conf if --workdir is specified.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap/bootstrap10
1 files changed, 7 insertions, 3 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index ecfda6d9e2e..892bd38520f 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: bootstrap,v 1.158 2010/08/13 18:57:36 joerg Exp $
+# $NetBSD: bootstrap,v 1.159 2010/08/30 06:21:49 obache Exp $
#
#
# Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved.
@@ -362,6 +362,7 @@ pkgdbdir=
pkgmandir=
sysconfdir=
varbase=
+workdir=
full=no
compiler=""
@@ -370,8 +371,8 @@ mk_fragment=
while [ $# -gt 0 ]; do
case $1 in
- --workdir=*) wrkdir=`get_optarg "$1"` ;;
- --workdir) wrkdir="$2"; shift ;;
+ --workdir=*) wrkdir=`get_optarg "$1"`; workdir=${wrkdir} ;;
+ --workdir) wrkdir="$2"; shift; workdir=${wrkdir} ;;
--prefix=*) prefix=`get_optarg "$1"` ;;
--prefix) prefix="$2"; shift ;;
--pkgdbdir=*) pkgdbdir=`get_optarg "$1"` ;;
@@ -1054,6 +1055,9 @@ fi
opsys_finish
echo "WRKOBJDIR= ${wrkdir}/wrk" >> ${BOOTSTRAP_MKCONF}
+if [ ! -z "${workdir}" ]; then
+ echo "WRKOBJDIR= ${workdir}/pkgsrc" >> ${TARGET_MKCONF}
+fi
echo "" >> ${TARGET_MKCONF}
echo "" >> ${BOOTSTRAP_MKCONF}