summaryrefslogtreecommitdiff
path: root/binary/mingw-w64/build-dist
diff options
context:
space:
mode:
Diffstat (limited to 'binary/mingw-w64/build-dist')
-rwxr-xr-xbinary/mingw-w64/build-dist47
1 files changed, 24 insertions, 23 deletions
diff --git a/binary/mingw-w64/build-dist b/binary/mingw-w64/build-dist
index b7b2047..5b8e1f0 100755
--- a/binary/mingw-w64/build-dist
+++ b/binary/mingw-w64/build-dist
@@ -4,6 +4,7 @@
#
# -rebuild
# -pack get the source distributions from /tmp/pack/
+# -j <jobs> [default is 8]
#
trap 'exit 1' ERR
@@ -30,6 +31,7 @@ function find_out_dir ()
rebuild=n
pack=n
+jobs=8
while [ $# -gt 0 ]; do
case $1 in
@@ -42,6 +44,11 @@ while [ $# -gt 0 ]; do
rebuild=y
shift
;;
+ -j)
+ shift
+ jobs=$1
+ shift
+ ;;
*)
error "unknown option: $1"
exit 1
@@ -85,12 +92,6 @@ if [ $rebuild = y ]; then
cp -r mingw-binutils/* /mingw/
fi
-if [ $pack = n ]; then
- rm -f /tmp/odb-$over-i686-windows.zip
-else
- rm -f /tmp/pack/odb-$over-i686-windows.zip
-fi
-
# Build libplugin-stub
#
if [ $rebuild = y ]; then
@@ -111,7 +112,7 @@ if [ $pack = n ]; then
make -C `find_out_dir $src_root/odb/libodb` -f $src_root/odb/libodb/makefile \
dist dist_prefix=$out_root/libodb
- if [ $rebuild = y ]; then
+ if [ $rebuild = y -o ! -f configure ]; then
cd libodb
./bootstrap
cd ..
@@ -124,11 +125,11 @@ fi
cd libodb
-if [ $rebuild = y ]; then
+if [ $rebuild = y -o ! -f Makefile ]; then
../libodb-configure
fi
-make
+make -j $jobs
cd odb
make install-data
cd ../..
@@ -139,7 +140,7 @@ if [ $pack = n ]; then
make -C `find_out_dir $src_root/odb/libodb-boost` -f $src_root/odb/libodb-boost/makefile \
dist dist_prefix=$out_root/libodb-boost
- if [ $rebuild = y ]; then
+ if [ $rebuild = y -o ! -f configure ]; then
cd libodb-boost
./bootstrap
cd ..
@@ -152,11 +153,11 @@ fi
cd libodb-boost
-if [ $rebuild = y ]; then
+if [ $rebuild = y -o ! -f Makefile ]; then
../libodb-boost-configure
fi
-make
+make -j $jobs
make install-data
cd ..
@@ -166,7 +167,7 @@ if [ $pack = n ]; then
make -C `find_out_dir $src_root/odb/libodb-qt` -f $src_root/odb/libodb-qt/makefile \
dist dist_prefix=$out_root/libodb-qt
- if [ $rebuild = y ]; then
+ if [ $rebuild = y -o ! -f configure ]; then
cd libodb-qt
./bootstrap
cd ..
@@ -179,11 +180,11 @@ fi
cd libodb-qt
-if [ $rebuild = y ]; then
+if [ $rebuild = y -o ! -f Makefile ]; then
../libodb-qt-configure
fi
-make
+make -j $jobs
make install-data
cd ..
@@ -192,7 +193,7 @@ cd ..
if [ $pack = n ]; then
make -C $src_root/cutl/libcutl dist dist_prefix=$out_root/libcutl
- if [ $rebuild = y ]; then
+ if [ $rebuild = y -o ! -f configure ]; then
cd libcutl
./bootstrap
cd ..
@@ -204,11 +205,11 @@ fi
cd libcutl
-if [ $rebuild = y ]; then
+if [ $rebuild = y -o ! -f Makefile ]; then
../libcutl-configure
fi
-make -j 10
+make -j $jobs
cd ..
# Build odb
@@ -216,7 +217,7 @@ cd ..
if [ $pack = n ]; then
make -C $src_root/odb/odb dist dist_prefix=$out_root/odb
- if [ $rebuild = y ]; then
+ if [ $rebuild = y -o ! -f configure ]; then
cd odb
./bootstrap
cd ..
@@ -229,11 +230,11 @@ fi
mkdir -p odb-build
cd odb-build
-if [ $rebuild = y ]; then
+if [ $rebuild = y -o ! -f Makefile ]; then
../odb-configure $over
fi
-make -j 10
+make -j $jobs
make install-strip
rm -r $install_root/libexec # odb/odb.a
cd ..
@@ -243,13 +244,13 @@ cd ..
mkdir -p gcc-build
cd gcc-build
-if [ $rebuild = y ]; then
+if [ $rebuild = y -o ! -f Makefile ]; then
../gcc-configure
else
rm -f gcc/cc1plus.exe gcc/cc1plus-dummy.exe
fi
-make STATIC_PLUGIN_LIBS="-Wl,--whole-archive $out_root/odb-build/odb/.libs/odb.a -Wl,--no-whole-archive $out_root/libcutl/cutl/.libs/libcutl.a -lstdc++ -static-libgcc" -j 10
+make -j $jobs STATIC_PLUGIN_LIBS="-Wl,--whole-archive $out_root/odb-build/odb/.libs/odb.a -Wl,--no-whole-archive $out_root/libcutl/cutl/.libs/libcutl.a -lstdc++ -static-libgcc"
make install
make -C i686-w64-mingw32/libstdc++-v3 install-strip
cd ..