summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2012-03-06 21:33:12 +0000
committerRobert Mustacchi <rm@joyent.com>2012-03-06 22:23:04 +0000
commitce49e6b3932f15d4fcd24eb7cd7e0379ea371583 (patch)
treede15a40cbc55d82c638125850de4da5bf3f5a3a7
parent22237de925d22826c55de034a9bc8075581f3166 (diff)
downloadillumos-kvm-cmd-ce49e6b3932f15d4fcd24eb7cd7e0379ea371583.tar.gz
HVM-724 Allow more configuration of build.sh via env vars
This is an extension of work that was initially done by Jason King <jason.brian.king@gmail.com>.
-rwxr-xr-xbuild.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/build.sh b/build.sh
index c66f29b..3b89c3a 100755
--- a/build.sh
+++ b/build.sh
@@ -30,8 +30,10 @@ if [[ ! -e ${PNGLIB}/libpng.a ]]; then
fi
echo "==> Running configure"
+KVM_DIR="${KVM_DIR:-$(cd `pwd`/../kvm; pwd)}"
+CC="${CC:-/usr/sfw/bin/gcc}"
./configure \
- --cc=/usr/sfw/bin/gcc \
+ --cc=$CC \
--extra-cflags="-I${PNGDIR}/proto/usr/local/include" \
--extra-ldflags="-L${PNGDIR}/proto/usr/local/lib -lz -lm" \
--prefix=/smartdc \
@@ -50,7 +52,7 @@ echo "==> Running configure"
--disable-vnc-sasl \
--disable-vnc-tls \
--enable-trace-backend=dtrace \
- --kerneldir=$(cd `pwd`/../kvm; pwd) \
+ --kerneldir="$KVM_DIR" \
--cpu=x86_64
if [[ $? != 0 ]]; then
@@ -62,9 +64,9 @@ fi
#
# Make sure ctf utilities are in our path
#
-KERNEL_SOURCE=$(pwd)/../../illumos
-CTFBINDIR=$KERNEL_SOURCE/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386
-export PATH=$PATH:$CTFBINDIR
+KERNEL_SOURCE="${KERNEL_SOURCE:-$(pwd)/../../illumos}"
+CTFBINDIR="$KERNEL_SOURCE"/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386
+export PATH="$PATH:$CTFBINDIR"
echo "==> Make"
gmake