mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
misc/rmlint: Fix multiple jobs configuration.
scons takes a jobs argument (either --jobs=N or -jN) but will fail if MAKEFLAGS has other values in it. This change mirrors how it is done in pybik.SlackBuild. Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
00eb4e70a0
commit
a9bbeacc23
1 changed files with 9 additions and 1 deletions
|
@ -81,7 +81,15 @@ find -L . \
|
|||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
scons config CXXFLAGS="$SLKCFLAGS"
|
||||
scons "$MAKEFLAGS" CXXFLAGS="$SLKCFLAGS"
|
||||
|
||||
# scons can use multiple jobs. For convenience, read MAKEFLAGS from the environment, if set
|
||||
JOBS="$( echo $MAKEFLAGS | sed 's,.*-j *\([0-9][0-9]*\)*.*,\1,' )"
|
||||
# or if no MAKEFLAGS, use the number of cores minus 1
|
||||
JOBS="${JOBS:-$(( $( nproc ) - 1 ))}"
|
||||
# or 1, if we really have one core
|
||||
[ "$JOBS" = "0" ] && JOBS=1
|
||||
|
||||
scons --jobs="$JOBS" CXXFLAGS="$SLKCFLAGS"
|
||||
scons --prefix=${PKG}/usr install
|
||||
|
||||
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
|
||||
|
|
Loading…
Reference in a new issue