From b2bbaef640f21f794198e83b852c7a87db067645 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 8 Oct 2016 02:02:07 +0000 Subject: [PATCH] buildx.sh: utilize all available CPUs when compiling --- xorg/X11R7.6/buildx.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xorg/X11R7.6/buildx.sh b/xorg/X11R7.6/buildx.sh index 0ae62a34..61d2126e 100755 --- a/xorg/X11R7.6/buildx.sh +++ b/xorg/X11R7.6/buildx.sh @@ -149,7 +149,7 @@ make_it() # make module if [ ! -e cookies/$mod_name.made ]; then - if ! make -C build_dir/$mod_name + if ! make -j $NPROC -C build_dir/$mod_name then echo "" echo "make failed for module $mod_name" @@ -267,6 +267,10 @@ if [ ! -d cookies ]; then fi fi +if ! NPROC=`nproc`; then + NPROC=1 +fi + while IFS=: read mod_file mod_dir mod_args do mod_args=`eval echo $mod_args`