]> xenbits.xensource.com Git - people/liuw/rump-build-script-junk.git/commitdiff
move building qemu to script-qemu
authorWei Liu <wei.liu2@citrix.com>
Fri, 31 Jul 2015 10:54:07 +0000 (11:54 +0100)
committerWei Liu <wei.liu2@citrix.com>
Fri, 31 Jul 2015 10:54:07 +0000 (11:54 +0100)
script
script-qemu [new file with mode: 0755]

diff --git a/script b/script
index 94a74d12ffff9444f3713d3eae057fcacb668573..53395a36f3406c850c75644ce532481803754035 100755 (executable)
--- a/script
+++ b/script
@@ -114,39 +114,3 @@ dirx env PKG_CONFIG=/local/scratch/Rump-kernels/rump-build-script-junk/pkg-confi
        make V=1 CC=/local/scratch/Rump-kernels/rumprun/app-tools/x86_64-rumprun-netbsd-gcc -j4 CPPFLAGS="-U__SSE2__"
 stdmakeinstall
 
-# build qemu
-setdir /local/scratch/Rump-kernels/rump-build-script-junk/qemu
-dirx env PKG_CONFIG=/local/scratch/Rump-kernels/rump-build-script-junk/pkg-config \
-CPPFLAGS="-U__SSE2__" \
- ./configure \
- --enable-xen \
- --disable-linux-user \
- --cc=/local/scratch/Rump-kernels/rumprun/app-tools/x86_64-rumprun-netbsd-gcc \
- --static --cxx=false \
- --target-list=i386-softmmu \
-                --enable-debug --enable-trace-backend=stderr \
-                --prefix=/local/scratch/Rump-kernels/prefix-qemu \
-                --libdir=/local/scratch/Rump-kernels/prefix-qemu/lib \
-                --source-path=. \
-                --extra-cflags=" \
-                -I/local/scratch/Rump-kernels/prefix/include \
-                " \
-                --extra-ldflags=" \
-                -L/local/scratch/Rump-kernels/prefix/lib \
-                " \
-                --bindir=/local/scratch/Rump-kernels/prefix-qemu/bin \
-                --datadir=/local/scratch/Rump-kernels/prefix-qemu/share/qemu-xen \
-                --localstatedir=/var \
-                --disable-kvm \
-                --disable-docs \
-                --includedir=/local/scratch/Rump-kernels/prefix/include \
-                --extra-cflags=-I/local/scratch/Rump-kernels/prefix/include \
-                --extra-ldflags=-I/local/scratch/Rump-kernels/prefix/lib \
-                --disable-guest-agent \
-                --disable-werror \
-                --with-coroutine=gthread --disable-coroutine-pool \
-                --audio-drv-list= \
-                --disable-stack-protector
-dirx /local/scratch/Rump-kernels/rumprun/app-tools/x86_64-rumprun-netbsd-make -j4 CPPFLAGS="-U__SSE2__"
-stdmakeinstall
-
diff --git a/script-qemu b/script-qemu
new file mode 100755 (executable)
index 0000000..3b872dc
--- /dev/null
@@ -0,0 +1,90 @@
+#!/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/x86_64-rumprun-netbsd-make -j4
+}
+
+stdmakeinstall () {
+        dirx /local/scratch/Rump-kernels/rumprun/app-tools/x86_64-rumprun-netbsd-make install
+}
+
+want () {
+        gettar $1 "$2"
+        stdconfigure
+        stdmake
+        stdmakeinstall
+}
+
+# build qemu
+setdir /local/scratch/Rump-kernels/rump-build-script-junk/qemu
+dirx env PKG_CONFIG=/local/scratch/Rump-kernels/rump-build-script-junk/pkg-config \
+CPPFLAGS="-U__SSE2__" \
+ ./configure \
+ --enable-xen \
+ --disable-linux-user \
+ --cc=/local/scratch/Rump-kernels/rumprun/app-tools/x86_64-rumprun-netbsd-gcc \
+ --static --cxx=false \
+ --target-list=i386-softmmu \
+                --enable-debug --enable-trace-backend=stderr \
+                --prefix=/local/scratch/Rump-kernels/prefix-qemu \
+                --libdir=/local/scratch/Rump-kernels/prefix-qemu/lib \
+                --source-path=. \
+                --extra-cflags=" \
+                -I/local/scratch/Rump-kernels/prefix/include \
+                " \
+                --extra-ldflags=" \
+                -L/local/scratch/Rump-kernels/prefix/lib \
+                " \
+                --bindir=/local/scratch/Rump-kernels/prefix-qemu/bin \
+                --datadir=/local/scratch/Rump-kernels/prefix-qemu/share/qemu-xen \
+                --localstatedir=/var \
+                --disable-kvm \
+                --disable-docs \
+                --includedir=/local/scratch/Rump-kernels/prefix/include \
+                --extra-cflags=-I/local/scratch/Rump-kernels/prefix/include \
+                --extra-ldflags=-I/local/scratch/Rump-kernels/prefix/lib \
+                --disable-guest-agent \
+                --disable-werror \
+                --with-coroutine=gthread --disable-coroutine-pool \
+                --audio-drv-list= \
+                --disable-stack-protector
+dirx /local/scratch/Rump-kernels/rumprun/app-tools/x86_64-rumprun-netbsd-make -j4 CPPFLAGS="-U__SSE2__"
+stdmakeinstall