From 711c224828bca4305c775a8687dadab4832450e4 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 31 Mar 2010 15:09:47 -0700 Subject: [PATCH] scripts: build-all: Allow Limit load average on builds. Accept the -l make argument as well as -j. Neither of these arguments now have a default, other than what make uses, allowing the user to specify whatever value they wish. Signed-off-by: David Brown (cherry picked from commit 0b2e450e1478711a0d19f15a7e66dec742468d7b) --- scripts/build-all.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/build-all.py b/scripts/build-all.py index 39f12d16a0ca..4a087c351eec 100755 --- a/scripts/build-all.py +++ b/scripts/build-all.py @@ -177,8 +177,11 @@ def main(): dest='updateconfigs', help="Update defconfigs with provided option setting, " "e.g. --updateconfigs=\'CONFIG_USE_THING=y\'") - parser.add_option('-j', '--jobs', type='int', dest="jobs", default=6, + parser.add_option('-j', '--jobs', type='int', dest="jobs", help="Number of simultaneous jobs") + parser.add_option('-l', '--load-average', type='int', + dest='load_average', + help="Don'start t multiple jobs unless load is below LOAD_AVERAGE.") (options, args) = parser.parse_args() global all_options @@ -194,7 +197,10 @@ def main(): global make_command make_command = ["oldconfig"] - make_command.append("-j%d" % options.jobs) + if options.jobs: + make_command.append("-j%d" % options.jobs) + if options.load_average: + make_command.append("-l%d" % options.load_average) if args == ['all']: build_many(configs, configs.keys())