3
0
Tomáš Chvátal 2018-04-07 15:58:09 +00:00 committed by Git OBS Bridge
parent 10406535cc
commit a5d874f230

View File

@ -19,7 +19,7 @@
max_mem=$(awk '/MemTotal/ { print $2 }' /proc/meminfo) \
max_jobs="$(($max_mem / ($mem_per_process * 1000)))" \
test "$_threads" -gt "$max_jobs" && _threads="$max_jobs" && echo "Warning: Reducing number of jobs to $max_jobs because of memory limits" \
test "$_threads" -le 0 && $_threads=1 && echo "Warning: Do not use the parallel build at all because of memory limits" \
test "$_threads" -le 0 && _threads=1 && echo "Warning: Do not use the parallel build at all because of memory limits" \
fi \
%global jobs $([[ -n $_threads ]] && echo $_threads || echo "`/usr/bin/getconf _NPROCESSORS_ONLN`") \
%global _smp_mflags $([[ -n $_threads ]] && echo "-j$_threads" || echo "-j`/usr/bin/getconf _NPROCESSORS_ONLN`") \