]> xenbits.xensource.com Git - osstest/rumprun.git/commitdiff
Accept a -o parameter which determines the build objdir
authorAntti Kantee <pooka@iki.fi>
Fri, 18 Sep 2015 15:52:26 +0000 (15:52 +0000)
committerAntti Kantee <pooka@iki.fi>
Fri, 18 Sep 2015 15:52:26 +0000 (15:52 +0000)
Only part of the objects go there as of now, and more work
is required to stuff all of the objects into objdir.

build-rr.sh

index 84bd4566bd2e87cdeb7566edffa5881b549ed5da..c81ffd7651fdbf0d9550f1304c39eff5fa87e7c3 100755 (executable)
@@ -34,8 +34,11 @@ die ()
 helpme ()
 {
 
-       echo "Usage: $0 [-k] [-s srcdir] [-q] hw|xen [-- buildrump.sh options]"
+       printf "Usage: $0 [-k] [-o objdir] [-s srcdir] [-q] hw|xen\n"
+       printf "\t    [-- buildrump.sh options]\n"
+       printf "\n"
        printf "\t-k: build kernel only, without libc or tools (expert-only)\n"
+       printf "\t-o: use non-default object directory (under development)\n"
        printf "\t-s: specify alternative src-netbsd location (expert-only)\n"
        printf "\t-q: quiet(er) build.  option maybe be specified twice.\n\n"
        printf "buildrump.sh options are passed to buildrump.sh (expert-only)\n"
@@ -53,6 +56,8 @@ RUMPSRC=src-netbsd
 BUILDRUMP=$(pwd)/buildrump.sh
 KERNONLY=false
 
+unset RUMPOBJ
+
 # overriden by script if true
 HAVECXX=false
 
@@ -72,11 +77,14 @@ parseargs ()
 {
 
        orignargs=$#
-       while getopts '?kqs:' opt; do
+       while getopts '?ko:qs:' opt; do
                case "$opt" in
                'k')
                        KERNONLY=true
                        ;;
+               'o')
+                       RUMPOBJ="${OPTARG}"
+                       ;;
                's')
                        RUMPSRC=${OPTARG}
                        ;;
@@ -121,7 +129,6 @@ parseargs ()
        export BUILD_QUIET
 
        RUMPTOOLS=${PLATFORMDIR}/rumptools
-       RUMPOBJ=${PLATFORMDIR}/rumpobj
        RUMPDEST=${PLATFORMDIR}/rump
 
        ARGSSHIFT=$((${orignargs} - $#))
@@ -198,6 +205,10 @@ buildrump ()
        unset extracflags
        [ "${MACHINE}" = "amd64" ] && extracflags='-F CFLAGS=-mno-red-zone'
 
+       if [ -z "${RUMPOBJ}" ]; then
+               RUMPOBJ="./obj-${PLATFORM}-${MACHINE}"
+       fi
+
        # build tools
        ${BUILDRUMP}/buildrump.sh ${BUILD_QUIET} ${STDJ} -k             \
            -s ${RUMPSRC} -T ${RUMPTOOLS} -o ${RUMPOBJ} -d ${RUMPDEST}  \