]> xenbits.xensource.com Git - rumpuser-xen.git/commitdiff
support -s alternative_source_tree
authorAntti Kantee <pooka@iki.fi>
Fri, 19 Dec 2014 00:13:50 +0000 (00:13 +0000)
committerAntti Kantee <pooka@iki.fi>
Fri, 19 Dec 2014 00:13:50 +0000 (00:13 +0000)
buildxen.sh

index 76a0c8b950a7829f13ed6542d613c1f9dfeddcec..1bf1cfe8344c2f1588d33365771b31dfc7e65e94 100755 (executable)
@@ -5,6 +5,18 @@
 # required, and is not pretending to be fancy.
 
 STDJ='-j4'
+RUMPSRC=rumpsrc
+
+while getopts '?s:' opt; do
+       case "$opt" in
+       's')
+               RUMPSRC=${OPTARG}
+               ;;
+       '?')
+               exit 1
+       esac
+done
+shift $((${OPTIND} - 1))
 
 # the buildxen.sh is not as forgiving as I am
 set -e
@@ -12,14 +24,14 @@ set -e
 [ ! -f ./buildrump.sh/subr.sh ] && git submodule update --init buildrump.sh
 . ./buildrump.sh/subr.sh
 
-if git submodule status rumpsrc | grep -q '^-' ; then
-       git submodule update --init --recursive rumpsrc
+if git submodule status ${RUMPSRC} | grep -q '^-' ; then
+       git submodule update --init --recursive ${RUMPSRC}
 fi
 [ "$1" = "justcheckout" ] && { echo ">> $0 done" ; exit 0; }
 
 # build tools
 ./buildrump.sh/buildrump.sh -${BUILDXEN_QUIET:-q} ${STDJ} -k \
-    -V MKPIC=no -s rumpsrc -T rumptools -o rumpobj -N \
+    -V MKPIC=no -s ${RUMPSRC} -T rumptools -o rumpobj -N \
     -V RUMP_KERNEL_IS_LIBC=1 tools
 
 # set some special variables.
@@ -36,11 +48,11 @@ EOF
 RUMPMAKE=$(pwd)/rumptools/rumpmake
 
 # build rump kernel
-./buildrump.sh/buildrump.sh -k -V MKPIC=no -s rumpsrc -T rumptools -o rumpobj build kernelheaders install
+./buildrump.sh/buildrump.sh -k -V MKPIC=no -s ${RUMPSRC} -T rumptools -o rumpobj build kernelheaders install
 
-LIBS="$(stdlibs rumpsrc)"
+LIBS="$(stdlibs ${RUMPSRC})"
 usermtree rump
-userincludes rumpsrc ${LIBS}
+userincludes ${RUMPSRC} ${LIBS}
 
 make -C xen links
 
@@ -57,14 +69,14 @@ makekernlib ()
 }
 makekernlib rumpxenif
 makekernlib rumpxendev
-makepci rumpsrc
+makepci ${RUMPSRC}
 
 for lib in ${LIBS}; do
        makeuserlib ${lib}
 done
 
 ./buildrump.sh/buildrump.sh ${BUILD_QUIET} $* \
-    -s rumpsrc -T rumptools -o rumpobj install
+    -s ${RUMPSRC} -T rumptools -o rumpobj install
 
 [ ! -f img/test.ffs ] && cp img/test_clean.ffs img/test.ffs