From ab65304f7e4a4e39fed6c79c1dd1bc5d3029529a Mon Sep 17 00:00:00 2001 From: jandob Date: Thu, 28 Jan 2016 12:35:01 +0100 Subject: fix --- builder/dnbd3-rootfs/scripts/build.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'builder/dnbd3-rootfs/scripts') diff --git a/builder/dnbd3-rootfs/scripts/build.sh b/builder/dnbd3-rootfs/scripts/build.sh index b150de58..e2e44034 100644 --- a/builder/dnbd3-rootfs/scripts/build.sh +++ b/builder/dnbd3-rootfs/scripts/build.sh @@ -10,6 +10,7 @@ build_compile_qemu_xmount() { # "$1/libxmount_input_qemu.so" pushd "$1" local xmount_installation="../xmount/trunk/build/release_build" + [ ! -z "$2" ] && xmount_installation="$2" ./configure --enable-xmount-input --python=$(which python2) \ --extra-cflags="-fPIC" \ --extra-cflags="-I${xmount_installation}/include" \ @@ -32,11 +33,18 @@ build_compile_xmount() { # Provides the xmount installation under: # "$1/trunk/build/release_build/" pushd "$1" + + local destination_directory="./release_build" + [ ! -z "$2" ] && destination_directory="$2" + local install_prefix="/" + [ ! -z "$3" ] && install_prefix="$3" + mkdir -p trunk/build cd trunk/build - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ .. + cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="$install_prefix" .. make - make install DESTDIR=./release_build + make install DESTDIR="$destination_directory" local ret=$? popd return $ret @@ -46,7 +54,7 @@ build_clean_xmount() { } build_clean_qemu_nbd() { pushd "$1" - make clean # TODO use git clean -f -x + git clean -f -x || make clean popd return $? } -- cgit v1.2.3-55-g7522