option.sh: don't use nproc (not portable)
export CBMK_THREADS=x where x is an integer. this is already supported for setting the number of build threads, but if not set it uses nproc. openbsd doesn't have nproc. default to 1 thread. now you MUST set threads. e.g. in linux do: export CBMK_THREADS=$(nproc) preliminary work is being done to make cbmk run on openbsd! Signed-off-by: Leah Rowe <leah@libreboot.org>audit2-merge1
parent
ee853c20e0
commit
45ac5f1741
|
@ -15,13 +15,14 @@ tmpgit="${PWD}/tmp/gitclone"
|
|||
eval "$(setvars "" board boarddir)"
|
||||
|
||||
threads=
|
||||
set | grep CBMK_THREADS 1>/dev/null 2>/dev/null || threads=$(nproc) || :
|
||||
[ -z "$threads" ] && threads=$CBMK_THREADS
|
||||
[ -z "$threads" ] && threads=1 # CBMK_THREADS not set, and nproc failed
|
||||
set | grep CBMK_THREADS 1>/dev/null 2>/dev/null && threads="$CBMK_THREADS"
|
||||
[ -z "$threads" ] && threads=1
|
||||
|
||||
expr "X$threads" : "X-\{0,1\}[0123456789][0123456789]*$" \
|
||||
1>/dev/null 2>/dev/null || threads=1 # user specified a non-integer
|
||||
|
||||
export CBMK_THREADS="$threads"
|
||||
|
||||
items()
|
||||
{
|
||||
rval=1
|
||||
|
|
Loading…
Reference in New Issue