This wants to be set right anyway for the Debian build, and it's better
to say such things only once.
esac
done
+## Parse DEB_BUILD_OPTIONS.
+jobs=1
+set -- $DEB_BUILD_OPTIONS
+for opt; do
+ case "$opt" in
+ parallel=*) jobs=${opt#*=} ;;
+ esac
+done
+
+makeopts=""
+case $jobs in 1) ;; *) makeopts="$makeopts -j$jobs" ;; esac
+
###--------------------------------------------------------------------------
### Utility functions.
## Get a tarball distribution.
case "$distcheck" in
yes)
- run make distcheck
+ run make $makeopts distcheck
;;
no)
- run make dist
+ run make $makeopts dist
;;
esac