Skip to content

Commit fc88bbc

Browse files
committed
Merge pull request kivy#420 from thopiekar/master
Replace hardcoded "-jX" for make
2 parents 2e154cc + c16db07 commit fc88bbc

File tree

15 files changed

+23
-19
lines changed

15 files changed

+23
-19
lines changed

distribute.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ case $OSTYPE in
9393
;;
9494
esac
9595

96+
if [ -f /proc/cpuinfo ]; then
97+
export MAKE_JOBS=($(grep -c ^processor /proc/cpuinfo) +1 )
98+
else
99+
export MAKE_JOBS=1
100+
fi
96101

97102
# Internals
98103
CRED="\x1b[31;01m"
@@ -214,7 +219,7 @@ function push_arm() {
214219
export RANLIB="$TOOLCHAIN_PREFIX-ranlib"
215220
export LD="$TOOLCHAIN_PREFIX-ld"
216221
export STRIP="$TOOLCHAIN_PREFIX-strip --strip-unneeded"
217-
export MAKE="make -j5"
222+
export MAKE="make"
218223
export READELF="$TOOLCHAIN_PREFIX-readelf"
219224

220225
# This will need to be updated to support Python versions other than 2.7

recipes/c_igraph/recipe.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ function build_c_igraph() {
4848
fi
4949

5050

51-
try $MAKE
52-
try $MAKE install
51+
try $MAKE -j$MAKE_JOBS
52+
try $MAKE -j$MAKE_JOBS install
5353

5454
pop_arm
5555
touch .built

recipes/freetype/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function build_freetype() {
1818
push_arm
1919
export LDFLAGS="$LDFLAGS -L$BUILD_harfbuzz/src/.libs/"
2020
try ./configure --host=arm-linux-androideabi --prefix=$BUILD_freetype --without-zlib --with-png=no --enable-shared
21-
try make -j5
21+
try make -j$MAKE_JOBS
2222
pop_arm
2323

2424
try cp $BUILD_freetype/objs/.libs/libfreetype.so $LIBS_PATH

recipes/harfbuzz/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function build_harfbuzz() {
2727
#try ./configure --build=i686-pc-linux-gnu --host=arm-linux-androideabi --prefix="$BUILD_PATH/python-install" --enable-shared --without-freetype --without-glib
2828
#~ try ./autogen.sh --build=i686-pc-linux-gnu --host=arm-linux-androideabi --prefix="$BUILD_PATH/python-install" --without-freetype --without-glib
2929
try ./configure --without-icu --host=arm-linux-androideabi --prefix="$BUILD_PATH/python-install" --without-freetype --without-glib
30-
try make -j5
30+
try make -j$MAKE_JOBS
3131
pop_arm
3232
try cp -L $BUILD_harfbuzz/src/.libs/libharfbuzz.so $LIBS_PATH
3333
}

recipes/hostpython/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function build_hostpython() {
2525
cd $BUILD_hostpython
2626

2727
try ./configure
28-
try make -j5
28+
try make -j$MAKE_JOBS
2929
try mv Parser/pgen hostpgen
3030

3131
if [ -f python.exe ]; then

recipes/libevent/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function build_libevent() {
2222

2323
push_arm
2424
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-eabi --prefix=$BUILD_libevent/build/
25-
try make install
25+
try make -j$MAKE_JOBS install
2626
pop_arm
2727
}
2828

recipes/libpq/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function build_libpq() {
2929
push_arm
3030

3131
try ./configure --without-readline --host=arm-linux
32-
try make submake-libpq
32+
try make -j$MAKE_JOBS submake-libpq
3333
try cp -a $BUILD_libpq/src/interfaces/libpq/libpq.a $LIBS_PATH
3434

3535
pop_arm

recipes/libsodium/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function build_libsodium() {
2323
push_arm
2424

2525
try ./configure --enable-minimal --disable-soname-versions --host="arm-linux-androideabi" --enable-shared
26-
try make
26+
try make -j$MAKE_JOBS
2727

2828
try cp -L $BUILD_libsodium/src/libsodium/.libs/libsodium.so $LIBS_PATH
2929

recipes/libtorrent/recipe.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ function build_libtorrent() {
2828

2929
# Build the Python bindings with Boost.Build and some dependencies recursively (libtorrent-rasterbar, Boost.*)
3030
# Also link to openssl
31-
# Hardcoded on -j5 because P4A does it too
32-
$BOOST_ROOT/b2 -q -j5 target-os=android link=static boost-link=static boost=source threading=multi toolset=gcc-android geoip=off encryption=tommath linkflags="$BOOSTSTUFF" release
31+
$BOOST_ROOT/b2 -q -j$MAKE_JOBS target-os=android link=static boost-link=static boost=source threading=multi toolset=gcc-android geoip=off encryption=tommath linkflags="$BOOSTSTUFF" release
3332

3433
# Copy the module
3534
try cp -L libtorrent.so $SITEPACKAGES_PATH

recipes/libxml2/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function build_libxml2() {
2626
--without-modules --without-legacy --without-history --without-debug --without-docbook --without-python
2727
try $SED 's/ runtest\$(EXEEXT) \\/ \\/' Makefile
2828
try $SED 's/ testrecurse\$(EXEEXT)$//' Makefile
29-
try make
29+
try make -j$MAKE_JOBS
3030

3131
pop_arm
3232
}

recipes/libxslt/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function build_libxslt() {
3030
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-eabi \
3131
--without-plugins --without-debug --without-python --without-crypto \
3232
--with-libxml-src=$BUILD_libxml2
33-
try make
33+
try make -j$MAKE_JOBS
3434

3535

3636
pop_arm

recipes/libyaml/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function build_libyaml() {
2323

2424
# using arm-linux-eabi does not create a shared library
2525
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-androideabi
26-
try make
26+
try make -j$MAKE_JOBS
2727

2828
try cp -L $BUILD_libyaml/src/.libs/libyaml.so $LIBS_PATH
2929

recipes/opencv/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function build_opencv() {
4545
-DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_ANDROID_EXAMPLES=OFF \
4646
-DPYTHON_PACKAGES_PATH=$SITEPACKAGES_PATH \
4747
$_cvsrc
48-
try make -j8 opencv_python
48+
try make -j$MAKE_JOBS opencv_python
4949
try cmake -DCOMPONENT=python -P ./cmake_install.cmake
5050
try cp -a $_cvbuild/lib/$ARCH/lib*.so $LIBS_PATH
5151

recipes/openssl/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function build_openssl() {
2323
push_arm
2424

2525
try ./Configure no-dso no-krb5 linux-armv4
26-
try make build_libs
26+
try make -j$MAKE_JOBS build_libs
2727

2828
pop_arm
2929
}

recipes/python/recipe.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function build_python() {
105105

106106
try ./configure --host=$HOSTARCH --build=$BUILDARCH OPT=$OFLAG --prefix="$BUILD_PATH/python-install" --enable-shared --disable-toolbox-glue --disable-framework
107107
echo ./configure --host=$HOSTARCH --build=$BUILDARCH OPT=$OFLAG --prefix="$BUILD_PATH/python-install" --enable-shared --disable-toolbox-glue --disable-framework
108-
echo $MAKE HOSTPYTHON=$BUILD_python/hostpython HOSTPGEN=$BUILD_python/hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
108+
echo $MAKE -j$MAKE_JOBS HOSTPYTHON=$BUILD_python/hostpython HOSTPGEN=$BUILD_python/hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
109109
cp HOSTPYTHON=$BUILD_python/hostpython python
110110

111111
# FIXME, the first time, we got a error at:
@@ -115,10 +115,10 @@ function build_python() {
115115
# check if we can avoid this part.
116116

117117
debug 'First install (failing..)'
118-
$MAKE install HOSTPYTHON=$BUILD_python/hostpython HOSTPGEN=$BUILD_python/hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
118+
$MAKE -j$MAKE_JOBS install HOSTPYTHON=$BUILD_python/hostpython HOSTPGEN=$BUILD_python/hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
119119
debug 'Second install.'
120120
touch python.exe python
121-
$MAKE install HOSTPYTHON=$BUILD_python/hostpython HOSTPGEN=$BUILD_python/hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
121+
$MAKE -j$MAKE_JOBS install HOSTPYTHON=$BUILD_python/hostpython HOSTPGEN=$BUILD_python/hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
122122
pop_arm
123123

124124
system=$(uname -s)

0 commit comments

Comments
 (0)