diff options
| author | Patrick Pannuto <ppannuto@codeaurora.org> | 2010-08-04 11:42:20 -0700 |
|---|---|---|
| committer | Stephen Boyd <sboyd@codeaurora.org> | 2013-09-04 14:17:50 -0700 |
| commit | d6372230dbf253d1d3e8061b108e3dd499a697a6 (patch) | |
| tree | f2ffe89026e14b937d79e4d2583222687915c455 /scripts/build-all.py | |
| parent | fcbd3f3f1313bc5eaf7dad99fe74bb681accae52 (diff) | |
build-all: some convenience fixes
* mkdir -p build_dir instead of just failing
* Add perf / noperf targets since building "all" is often unnecessary
Change-Id: I3216f59338ca37e87b464cccbb9c1cc766356a6c
Signed-off-by: Patrick Pannuto <ppannuto@codeaurora.org>
(cherry picked from commit b4f13cfa5a53633c0246b2136decc5d210cfcd70)
Diffstat (limited to 'scripts/build-all.py')
| -rwxr-xr-x | scripts/build-all.py | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/scripts/build-all.py b/scripts/build-all.py index 5d9977d0244..86f18f6312d 100755 --- a/scripts/build-all.py +++ b/scripts/build-all.py @@ -66,7 +66,13 @@ def check_kernel(): def check_build(): """Ensure that the build directory is present.""" if not os.path.isdir(build_dir): - fail("Build directory doesn't exist, please create: %s" % build_dir) + try: + os.makedirs(build_dir) + except OSError as exc: + if exc.errno == errno.EEXIST: + pass + else: + raise def update_config(file, str): print 'Updating %s with \'%s\'\n' % (file, str) @@ -171,8 +177,11 @@ def main(): configs = scan_configs() - usage = ("usage: %prog [options] all\n" + - " %prog [options] target target ...") + usage = (""" + %prog [options] all -- Build all targets + %prog [options] target target ... -- List specific targets + %prog [options] perf -- Build all perf targets + %prog [options] noperf -- Build all non-perf targets""") parser = OptionParser(usage=usage, version=version) parser.add_option('--configs', action='store_true', dest='configs', @@ -220,6 +229,18 @@ def main(): if args == ['all']: build_many(configs, configs.keys()) + elif args == ['perf']: + targets = [] + for t in configs.keys(): + if "perf" in t: + targets.append(t) + build_many(configs, targets) + elif args == ['noperf']: + targets = [] + for t in configs.keys(): + if "perf" not in t: + targets.append(t) + build_many(configs, targets) elif len(args) > 0: targets = [] for t in args: |
