Skip to content
Snippets Groups Projects
Commit 69e46c62 authored by Olivier SOLDANO's avatar Olivier SOLDANO Committed by Anthony Léonard
Browse files

adapt win_compile script to core count


this patch makes the script able to scale its thread count
with the core count of the build machine.

Change-Id: I334679878d71f15ac1001650df61dcc4a725afeb
Reviewed-by: default avatarAnthony Léonard <anthony.leonard@savoirfairelinux.com>
parent 2e0422d5
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,8 @@ rootdir=$(pwd)
HOST=i686-w64-mingw32
ARCH=32
CMAKE_TOOLCHAIN_FILE=$rootdir/lrc/cmake/winBuild.cmake
$CORES=${CORES:=`nproc --all`}
echo "running compilation on $CORES threads"
while test -n "$1"
do
......@@ -31,14 +33,14 @@ mkdir -p native${ARCH}
cd native${ARCH}
../bootstrap --host=${HOST}
make fetch || exit 1
make -j4 || exit 1
make -j$CORES || exit 1
cd ../..
./autogen.sh || exit 1
mkdir -p "build${ARCH}"
cd build${ARCH}
$rootdir/daemon/configure --host=${HOST} --without-dbus --prefix=$INSTALL_PREFIX
rsync -a $rootdir/daemon/src/buildinfo.cpp ./src/buildinfo.cpp
make -j4 install || exit 1
make -j$CORES install || exit 1
cd $rootdir
cd lrc
......@@ -46,7 +48,7 @@ mkdir -p build${ARCH}
cd build${ARCH}
export CMAKE_PREFIX_PATH=/usr/${HOST}/sys-root/mingw/lib/cmake
cmake -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DRING_BUILD_DIR=$INSTALL_PREFIX -DENABLE_LIBWRAP=true ..
make -j4 install || exit 1
make -j$CORES install || exit 1
cd $rootdir
cd client-windows
......@@ -57,7 +59,7 @@ cd winsparkle
git submodule init && git submodule update
mkdir -p build${ARCH} && cd build${ARCH}
cmake -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX ../cmake
make -j4 || exit 1
make -j$CORES || exit 1
make install
cd ../../
fi
......@@ -67,12 +69,12 @@ cd libqrencode
./autogen.sh || exit 1
mkdir -p build${ARCH} && cd build${ARCH}
../configure --host=${HOST} --prefix=$INSTALL_PREFIX
make -j4 || exit 1
make -j$CORES || exit 1
make install
cd ../..
fi
mkdir -p build${ARCH}
cd build${ARCH}
${HOST}-qmake-qt5 ../RingWinClient.pro -r -spec win32-g++ RING=$INSTALL_PREFIX
make -j4 || exit 1
make -j$CORES || exit 1
make install
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment