Added MAKEFLAGS support.
This commit is contained in:
parent
2c2471d36e
commit
53bc10be29
4 changed files with 25 additions and 3 deletions
|
@ -112,7 +112,7 @@ chapter5_Makefiles() {
|
|||
|
||||
# Insert instructions for unpacking the package and to set the PKGDIR variable.
|
||||
wrt_unpack "$FILE"
|
||||
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name"
|
||||
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags
|
||||
fi
|
||||
|
||||
# Insert date and disk usage at the top of the log file, the script run
|
||||
|
@ -216,7 +216,7 @@ chapter6_Makefiles() {
|
|||
if [ "$vrs" != "" ] ; then
|
||||
FILE="$name-$vrs.tar.*"
|
||||
wrt_unpack2 "$FILE"
|
||||
[[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name"
|
||||
[[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags
|
||||
fi
|
||||
|
||||
# In the mount of kernel filesystems we need to set LFS
|
||||
|
|
|
@ -7,6 +7,11 @@
|
|||
#$Id$
|
||||
#
|
||||
|
||||
#--- Extra flags passed to the packages make commands
|
||||
# "unset" will cause the variable to be not set
|
||||
# instead of just set to null.
|
||||
MAKEFLAGS="-j3"
|
||||
|
||||
#--- Default optimization mode
|
||||
# This level is overridden by definitions in opt_override;
|
||||
# in this way, packages can be tuned independently. For example,
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
# doing. By default, this is set to disable optimization
|
||||
# of packages known to have build or runtime failure.
|
||||
#
|
||||
# Also, if you what to use MAKEFLAGS but no build
|
||||
# optimizations, set this mode in DEF_OPT_LVL
|
||||
#
|
||||
# Usage: - Apply optimization string to each variable
|
||||
# - "unset" will cause the variable to be not set
|
||||
# instead of being just set to null.
|
||||
|
|
|
@ -29,4 +29,18 @@ EOF
|
|||
continue
|
||||
fi
|
||||
done
|
||||
}
|
||||
}
|
||||
|
||||
#----------------------------------#
|
||||
wrt_makeflags() { # Apply MAKEFLAGS to build
|
||||
#----------------------------------#
|
||||
if [[ "$MAKEFLAGS" != "unset" ]]; then
|
||||
(
|
||||
cat << EOF
|
||||
@echo "export MAKEFLAGS=\"$MAKEFLAGS\"" >> envars
|
||||
EOF
|
||||
) >> $MKFILE.tmp
|
||||
else
|
||||
continue
|
||||
fi
|
||||
}
|
||||
|
|
Reference in a new issue