diff options
author | François Revol <revol@free.fr> | 2013-12-27 02:43:01 +0100 |
---|---|---|
committer | François Revol <revol@free.fr> | 2013-12-27 02:47:52 +0100 |
commit | 1ecdc551518e4373cfd76181b17f2ead4d9ebd30 (patch) | |
tree | 7160533013c30f1438a15822256998625db69a61 | |
parent | 289cd3a7975125d133f42ceb314db1332ff13032 (diff) | |
download | netsurf-1ecdc551518e4373cfd76181b17f2ead4d9ebd30.tar.gz netsurf-1ecdc551518e4373cfd76181b17f2ead4d9ebd30.tar.bz2 |
env.sh: Use a more portable way of counting online processors
getconf _NPROCESSORS_ONLN should be available on Linux, FreeBSD
and OSX at least:
http://linux.die.net/man/1/getconf
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/getconf.1.html
...and shall soon be available on Haiku as well.
-rw-r--r-- | Docs/env.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Docs/env.sh b/Docs/env.sh index db2729c0c..7dc9fcaf0 100644 --- a/Docs/env.sh +++ b/Docs/env.sh @@ -22,7 +22,7 @@ if [ "x${TARGET_WORKSPACE}" = "x" ]; then fi if [ "x${USE_CPUS}" = "x" ]; then - NCPUS=$(grep -c "^processor" /proc/cpuinfo 2>/dev/null) + NCPUS=$(getconf _NPROCESSORS_ONLN 2>/dev/null) NCPUS="${NCPUS:-1}" NCPUS=$((NCPUS * 2)) USE_CPUS="-j${NCPUS}" |