]> git.tuebingen.mpg.de Git - paraslash.git/commit
autogen.sh: Detect number of processors and run parallel make.
authorAndre Noll <maan@systemlinux.org>
Tue, 15 Feb 2011 07:28:43 +0000 (08:28 +0100)
committerAndre Noll <maan@systemlinux.org>
Wed, 6 Apr 2011 14:40:34 +0000 (16:40 +0200)
commit5379c6d7b5368100184792219248b48580755aae
tree0c869005e0b1dc2028d911ca04d51824d98ef9ef
parentc6c03bac20656834d531813cedb6304cf0fef21e
autogen.sh: Detect number of processors and run parallel make.

On multi-core machines a parallel make is often much faster than a
sequential make. This patch teaches autogen.sh to detect the number
of processing units available on the build system. It first tries to
execute the nproc utility (part of the coreutils package) and falls
back to /proc/cpuinfo if nproc was unavailable.

If both methods don't work, which is usually the case on non-Linux
systems where coreutils are not installed and /proc/cpuinfo does not
exist, we use the safe default of n=1.
autogen.sh