From 2e0d431c9dab7a99e2f2dcf41673924b1af5f714 Mon Sep 17 00:00:00 2001 From: jmoore Date: Thu, 17 Jan 2013 13:53:10 +0100 Subject: [PATCH] ./build.py -top now ignores local build.xml files Previous minor fixes to build.py allowed called from anywhere in the source repository. If a build.xml is present in the current directory, that is used. If not, then the top-level directory is used. However, there was no way to use the top-level when a build.xml was present. `-top` now allows this. --- build.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index b6aa00295ee..8d8c174a7e0 100755 --- a/build.py +++ b/build.py @@ -109,7 +109,7 @@ def choose_omero_version(): def handle_tools(args): additions = [] - while len(args) > 0 and args[0] in ("-perf", "-py", "-cpp"): + while len(args) > 0 and args[0] in ("-perf", "-py", "-cpp", "-top"): if args[0] == "-perf": args.pop(0) A = "-listener net.sf.antcontrib.perf.AntPerformanceListener".split() @@ -124,6 +124,11 @@ def handle_tools(args): F = os.path.sep.join(["components","tools","OmeroCpp","build.xml"]) A = ["-f", F] additions.extend(A) + elif args[0] == "-top": + args.pop(0) + F = os.path.sep.join(["build.xml"]) + A = ["-f", F] + additions.extend(A) return additions + args