Added MAKEFLAGS support.

This commit is contained in:
Manuel Canales Esparcia 2006-05-06 11:06:07 +00:00
parent 2c2471d36e
commit 53bc10be29
4 changed files with 25 additions and 3 deletions

View file

@ -112,7 +112,7 @@ chapter5_Makefiles() {
# Insert instructions for unpacking the package and to set the PKGDIR variable. # Insert instructions for unpacking the package and to set the PKGDIR variable.
wrt_unpack "$FILE" wrt_unpack "$FILE"
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags
fi fi
# Insert date and disk usage at the top of the log file, the script run # Insert date and disk usage at the top of the log file, the script run
@ -216,7 +216,7 @@ chapter6_Makefiles() {
if [ "$vrs" != "" ] ; then if [ "$vrs" != "" ] ; then
FILE="$name-$vrs.tar.*" FILE="$name-$vrs.tar.*"
wrt_unpack2 "$FILE" wrt_unpack2 "$FILE"
[[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" [[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags
fi fi
# In the mount of kernel filesystems we need to set LFS # In the mount of kernel filesystems we need to set LFS

View file

@ -7,6 +7,11 @@
#$Id$ #$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 #--- Default optimization mode
# This level is overridden by definitions in opt_override; # This level is overridden by definitions in opt_override;
# in this way, packages can be tuned independently. For example, # in this way, packages can be tuned independently. For example,

View file

@ -9,6 +9,9 @@
# doing. By default, this is set to disable optimization # doing. By default, this is set to disable optimization
# of packages known to have build or runtime failure. # 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 # Usage: - Apply optimization string to each variable
# - "unset" will cause the variable to be not set # - "unset" will cause the variable to be not set
# instead of being just set to null. # instead of being just set to null.

View file

@ -29,4 +29,18 @@ EOF
continue continue
fi fi
done done
} }
#----------------------------------#
wrt_makeflags() { # Apply MAKEFLAGS to build
#----------------------------------#
if [[ "$MAKEFLAGS" != "unset" ]]; then
(
cat << EOF
@echo "export MAKEFLAGS=\"$MAKEFLAGS\"" >> envars
EOF
) >> $MKFILE.tmp
else
continue
fi
}