diff options
-rwxr-xr-x | tools/rockboxdev.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh index 4af9acfb37..822a76da9f 100755 --- a/tools/rockboxdev.sh +++ b/tools/rockboxdev.sh | |||
@@ -29,6 +29,11 @@ else | |||
29 | make="make" | 29 | make="make" |
30 | fi | 30 | fi |
31 | 31 | ||
32 | parallel=`nproc` | ||
33 | if [ $parallel -gt 1 ] ; then | ||
34 | make_parallel=-j$parallel | ||
35 | fi | ||
36 | |||
32 | if [ -z $GNU_MIRROR ] ; then | 37 | if [ -z $GNU_MIRROR ] ; then |
33 | GNU_MIRROR=http://mirrors.kernel.org/gnu | 38 | GNU_MIRROR=http://mirrors.kernel.org/gnu |
34 | fi | 39 | fi |
@@ -322,7 +327,7 @@ buildtool() { | |||
322 | 327 | ||
323 | if [ "$make_opts" != "NO_MAKE" ]; then | 328 | if [ "$make_opts" != "NO_MAKE" ]; then |
324 | echo "ROCKBOXDEV: $toolname/make" | 329 | echo "ROCKBOXDEV: $toolname/make" |
325 | run_cmd "$logfile" $make $make_opts | 330 | run_cmd "$logfile" $make $make_parallel $make_opts |
326 | fi | 331 | fi |
327 | 332 | ||
328 | if [ "$install_opts" = "" ]; then | 333 | if [ "$install_opts" = "" ]; then |
@@ -428,7 +433,7 @@ build() { | |||
428 | esac | 433 | esac |
429 | 434 | ||
430 | echo "ROCKBOXDEV: $toolname/make" | 435 | echo "ROCKBOXDEV: $toolname/make" |
431 | $make | 436 | $make $make_parallel |
432 | 437 | ||
433 | echo "ROCKBOXDEV: $toolname/make install" | 438 | echo "ROCKBOXDEV: $toolname/make install" |
434 | $make install | 439 | $make install |