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
-
--- /dev/null
+#!/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