From: Andre Noll Date: Thu, 21 Apr 2011 20:56:56 +0000 (+0200) Subject: Merge branch 't/autogen' X-Git-Tag: v0.4.7~16 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=c0dca63e02352cae6a8c241dba4bc0d2c7cde050;hp=ef679cdaa57f21fb578ab774520b0972fefaefcb;p=paraslash.git Merge branch 't/autogen' --- diff --git a/NEWS b/NEWS index 3443ebb3..c08197f5 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,8 @@ - configure: improved options for ogg/vorbis/speex. - The git version reported by --version always matches HEAD. + - The autogen script detects the number of processors and + runs a parallel make if possible. ------------------------------------------ 0.4.6 (2011-03-31) "deterministic entropy" diff --git a/autogen.sh b/autogen.sh index a047f7c4..e5000a6f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,7 +1,13 @@ #!/bin/sh -echo preparing... +# check if we have multiple processors/cores +n=$(nproc 2>/dev/null) +if [ -z "$n" ]; then + n=$(grep ^processor /proc/cpuinfo 2>/dev/null | wc -l) + [ $n -eq 0 ] && n=1 +fi +echo preparing, parallel=$n... if test -f Makefile; then - make maintainer-clean > /dev/null + make maintainer-clean > /dev/null 2>&1 fi aclocal -I . > /dev/null 2>&1 autoconf @@ -10,4 +16,4 @@ echo configuring... ./configure $@ > /dev/null echo compiling... make clean2 > /dev/null 2>&1 -make > /dev/null +make -j $n > /dev/null