Use parallel make
- Speed up Libreswan compilation using parallel make ("-j" option)
This commit is contained in:
parent
f46e18cffc
commit
23c4a287d3
@ -146,7 +146,9 @@ EOF
|
||||
if [ "$(packaging/utils/lswan_detect.sh init)" = "systemd" ]; then
|
||||
apt-get -yq install libsystemd-dev || exiterr2
|
||||
fi
|
||||
make -s base && make -s install-base
|
||||
NPROCS="$(grep -c ^processor /proc/cpuinfo)"
|
||||
[ -z "$NPROCS" ] && NPROCS=1
|
||||
make "-j$((NPROCS+1))" -s base && make -s install-base
|
||||
|
||||
# Verify the install and clean up
|
||||
cd /opt/src || exiterr "Cannot enter /opt/src."
|
||||
|
@ -143,7 +143,9 @@ cat > Makefile.inc.local <<'EOF'
|
||||
WERROR_CFLAGS =
|
||||
USE_DNSSEC = false
|
||||
EOF
|
||||
make -s base && make -s install-base
|
||||
NPROCS="$(grep -c ^processor /proc/cpuinfo)"
|
||||
[ -z "$NPROCS" ] && NPROCS=1
|
||||
make "-j$((NPROCS+1))" -s base && make -s install-base
|
||||
|
||||
# Verify the install and clean up
|
||||
cd /opt/src || exiterr "Cannot enter /opt/src."
|
||||
|
@ -193,7 +193,9 @@ EOF
|
||||
if [ "$(packaging/utils/lswan_detect.sh init)" = "systemd" ]; then
|
||||
apt-get -yq install libsystemd-dev || exiterr2
|
||||
fi
|
||||
make -s base && make -s install-base
|
||||
NPROCS="$(grep -c ^processor /proc/cpuinfo)"
|
||||
[ -z "$NPROCS" ] && NPROCS=1
|
||||
make "-j$((NPROCS+1))" -s base && make -s install-base
|
||||
|
||||
# Verify the install and clean up
|
||||
cd /opt/src || exiterr "Cannot enter /opt/src."
|
||||
|
@ -188,7 +188,9 @@ cat > Makefile.inc.local <<'EOF'
|
||||
WERROR_CFLAGS =
|
||||
USE_DNSSEC = false
|
||||
EOF
|
||||
make -s base && make -s install-base
|
||||
NPROCS="$(grep -c ^processor /proc/cpuinfo)"
|
||||
[ -z "$NPROCS" ] && NPROCS=1
|
||||
make "-j$((NPROCS+1))" -s base && make -s install-base
|
||||
|
||||
# Verify the install and clean up
|
||||
cd /opt/src || exiterr "Cannot enter /opt/src."
|
||||
|
Loading…
Reference in New Issue
Block a user