]> xenbits.xensource.com Git - people/liuw/rump-build-script-junk.git/commitdiff
update xen-rune
authorWei Liu <wei.liu2@citrix.com>
Thu, 18 Jun 2015 11:33:26 +0000 (12:33 +0100)
committerWei Liu <wei.liu2@citrix.com>
Thu, 18 Jun 2015 16:35:39 +0000 (17:35 +0100)
xen-rune

index db388cac5882851e9c005b27a8b76ccc891f93fa..7b3aa3ff522fba8c80d0e28fcf64d5ec6eec191d 100755 (executable)
--- a/xen-rune
+++ b/xen-rune
@@ -1,4 +1,68 @@
-PKG_CONFIG=/local/scratch/Rump-kernels/rump-build-script-junk/pkg-config \
-       /local/scratch/Rump-kernels/rumpuser-xen/app-tools/rumpapp-xen-configure ./configure \
-       --prefix=/local/scratch/Rump-kernels/prefix --disable-stubodm --disable-docs
-/local/scratch/Rump-kernels/rumpuser-xen/app-tools/rumpapp-xen-make -j16
+#!/bin/sh
+
+set -e
+
+x () {
+        echo >&2 "x $*"
+        "$@"
+}
+
+setdir () {
+        dir=$1
+        echo "==================== $dir ===================="
+}
+
+gettar () {
+        setdir $1
+        local url=$2
+        if ! test -d $dir; then
+                local dlfile="${url##*/}"
+                rm -f "$dlfile"
+                wget "$url"
+                rm -rf d; mkdir d; cd d
+                x tar axf ../"$dlfile"
+                cd ..
+                mv d/$dir .
+        fi
+}
+
+dirx () {
+        cd $dir
+        x "$@"
+        cd ..
+}
+
+stdconfigure () {
+        dirx env PKG_CONFIG=/local/scratch/Rump-kernels/rump-build-script-junk/pkg-config \
+                /local/scratch/Rump-kernels/rumprun/app-tools/rumprun-xen-configure ./configure \
+                --prefix=/local/scratch/Rump-kernels/prefix --disable-shared
+}
+
+stdmake () {
+        dirx /local/scratch/Rump-kernels/rumprun/app-tools/rumprun-xen-make -j4
+}
+
+stdmakeinstall () {
+        dirx /local/scratch/Rump-kernels/rumprun/app-tools/rumprun-xen-make install
+}
+
+want () {
+        gettar $1 "$2"
+        stdconfigure
+        stdmake
+        stdmakeinstall
+}
+
+#  build libxc and libxenstore
+# run ./configure in toplevel to workaround a bug in Xen's build system
+# that Paths.mk doesn't get generate if only ./configure in tools
+setdir /local/scratch/Rump-kernels/xen.git
+dirx env PKG_CONFIG=/local/scratch/Rump-kernels/rump-build-script-junk/pkg-config \
+               /local/scratch/Rump-kernels/rumprun/app-tools/rumprun-xen-configure ./configure \
+               --prefix=/local/scratch/Rump-kernels/prefix \
+               --with-xen-dumpdir=/local/scratch/Rump-kernels/prefix/var/lib/xen/dump
+setdir /local/scratch/Rump-kernels/xen.git/tools
+dirx env PKG_CONFIG=/local/scratch/Rump-kernels/rump-build-script-junk/pkg-config \
+       make V=1 CC=/local/scratch/Rump-kernels/rumprun/app-tools/rumprun-xen-cc -j4 CPPFLAGS="-U__SSE2__"
+stdmakeinstall
+