diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-01-26 09:58:37 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-01-26 09:58:37 +0100 |
commit | b8dca95039982d76b647c97f50a2270d25f71fd0 (patch) | |
tree | 78b33dd11f1aa057dd1924e9991032094b1b0115 /scripts/build-submodules | |
parent | d1e120574de4b6cb14465ba743f6167552dd9cdb (diff) | |
download | vyos-build-b8dca95039982d76b647c97f50a2270d25f71fd0.tar.gz vyos-build-b8dca95039982d76b647c97f50a2270d25f71fd0.zip |
Build submodules in parallel with number of host CPUs
Diffstat (limited to 'scripts/build-submodules')
-rwxr-xr-x | scripts/build-submodules | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/build-submodules b/scripts/build-submodules index 9090c66e..987a055f 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -100,7 +100,7 @@ build_package() { fi ( set -e; set -x cd $PKGDIR/$PKG - dpkg-buildpackage -uc -us -tc -b + dpkg-buildpackage -uc -us -tc -b -j$(cat /proc/cpuinfo | grep processor | wc -l) ) >>$PKGDIR/$PKG.buildlog 2>&1 if [ $? -ne 0 ]; then status_fail @@ -185,7 +185,8 @@ build_frr() { # Build Debian Package debuild --no-lintian --set-envvar=WANT_SNMP=1 --set-envvar=WANT_RPKI=1 \ - --set-envvar=WANT_CUMULUS_MODE=0 -b -uc -us + --set-envvar=WANT_CUMULUS_MODE=0 -b -uc -us \ + -j$(cat /proc/cpuinfo | grep processor | wc -l) mv ../frr_*.deb $PKGDIR ) >>$PKGDIR/$PKG.buildlog 2>&1 @@ -332,7 +333,7 @@ build_wireguard() { ( set -e; set -x cd $PKGDIR/vyos-wireguard echo "src/wireguard.ko /lib/modules/$VERSION.$PATCHLEVEL.$SUBLEVEL-$ARCH-vyos/extra" | tee debian/wireguard-modules.install - KERNELDIR=$PKGDIR/vyos-kernel dpkg-buildpackage -uc -us -tc -b + KERNELDIR=$PKGDIR/vyos-kernel dpkg-buildpackage -uc -us -tc -b -j$(cat /proc/cpuinfo | grep processor | wc -l) ) >>$PKGDIR/vyos-wireguard.buildlog 2>&1 if [ $? -ne 0 ]; then status_fail @@ -383,7 +384,7 @@ build_accel-ppp() { cd $PKGDIR/vyos-accel-ppp echo "lib/modules/$VERSION.$PATCHLEVEL.$SUBLEVEL-$ARCH-vyos/extra/*.ko" | tee debian/vyos-accel-ppp-ipoe-kmod.install sed -i "s#[0-9].[0-9][0-9].[0-9]-amd64-vyos#$VERSION.$PATCHLEVEL.$SUBLEVEL-$ARCH-vyos#g" debian/rules - KERNELDIR=$PKGDIR/vyos-kernel dpkg-buildpackage -uc -us -tc -b + KERNELDIR=$PKGDIR/vyos-kernel dpkg-buildpackage -uc -us -tc -b -j$(cat /proc/cpuinfo | grep processor | wc -l) ) >>$PKGDIR/vyos-accel-ppp.buildlog 2>&1 if [ $? -ne 0 ]; then status_fail |