summaryrefslogtreecommitdiffstats
path: root/builder/dnbd3-rootfs/scripts/build.sh
diff options
context:
space:
mode:
authorjandob2016-01-28 12:35:01 +0100
committerjandob2016-01-28 12:35:01 +0100
commitab65304f7e4a4e39fed6c79c1dd1bc5d3029529a (patch)
treec2f44909d788a339cca0d19bfe1c8ccba841216c /builder/dnbd3-rootfs/scripts/build.sh
parentautomatic xmount building (diff)
downloadsystemd-init-ab65304f7e4a4e39fed6c79c1dd1bc5d3029529a.tar.gz
systemd-init-ab65304f7e4a4e39fed6c79c1dd1bc5d3029529a.tar.xz
systemd-init-ab65304f7e4a4e39fed6c79c1dd1bc5d3029529a.zip
fix
Diffstat (limited to 'builder/dnbd3-rootfs/scripts/build.sh')
-rw-r--r--builder/dnbd3-rootfs/scripts/build.sh14
1 files changed, 11 insertions, 3 deletions
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 $?
}