diff options
-rwxr-xr-x | sbrun | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -5,7 +5,7 @@ TMP=${TMP:-/tmp/SBo} OUTPUT=${OUTPUT:-/tmp} BUILDLOG=${BUILDLOG:-build.log} -DEFAULT_MAKEFLAGS="-j3" +DEFAULT_MAKEFLAGS="-j$(( $( nproc ) + 1 ))" # End of configurables. It's probably best not to configure TMP or # OUTPUT here (use the environment instead) anyway. Also it's probably @@ -21,6 +21,7 @@ if [ "$(id -u)" != "0" ]; then OUTPUT="$OUTPUT" \ MAKEFLAGS="$MAKEFLAGS" \ BUILDLOG="$BUILDLOG" \ + DISTCC_HOSTS="$DISTCC_HOSTS" \ "$0" "$@" fi @@ -118,6 +119,10 @@ beginning with - must occur before [script] or [variable=value]. -c Clean up (remove) source and package directories after the build completes. This option overrides \$TMP from the environment. +-d Use distcc for the compile. You still have to set DISTCC_HOSTS in the + environment, or in one of distcc's config files. This option sets + CC and CXX, allows network access, and disables filesystem tracking. + -h, --help Show short usage message and exit. @@ -342,6 +347,11 @@ while printf -- "$1" | grep -q ^-; do -c) CLEANUP="yes" ;; -i) SRCSH="yes" ;; -p) PKGSH="yes" ;; + -d) CC="distcc gcc" + CXX="distcc g++" + TRACK=no + NETWORK=yes + export CC CXX ;; -h|-help|--help) show_help ; exit 0 ;; -H) long_help ; exit 0 ;; -*) show_help "$1"; exit 1 ;; |