Permalink
Browse files

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>.
  • Loading branch information...
1 parent 22237de commit ce49e6b3932f15d4fcd24eb7cd7e0379ea371583 @rmustacc rmustacc committed Mar 6, 2012
Showing with 7 additions and 5 deletions.
  1. +7 −5 build.sh
View
@@ -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

0 comments on commit ce49e6b

Please sign in to comment.