From: Antti Kantee Date: Fri, 19 Dec 2014 00:13:50 +0000 (+0000) Subject: support -s alternative_source_tree X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0ea5e819fafc8f6a4aa015c3ad24bd9f8670cd01;p=rumpuser-xen.git support -s alternative_source_tree --- diff --git a/buildxen.sh b/buildxen.sh index 76a0c8b..1bf1cfe 100755 --- a/buildxen.sh +++ b/buildxen.sh @@ -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