Skip to content

Commit

Permalink
Unify top-level ./build.py args
Browse files Browse the repository at this point in the history
Now, "-fs", "-java", "-cpp", "-web", and "-py"
all run the builds at the proper layer, i.e.
equivalent to:

  ./build.py -f components/tools/X/build.xml
  • Loading branch information
joshmoore committed Jan 17, 2013
1 parent 2e0d431 commit 4d68058
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,25 +108,23 @@ def choose_omero_version():


def handle_tools(args):
_ = os.path.sep.join
additions = []
while len(args) > 0 and args[0] in ("-perf", "-py", "-cpp", "-top"):
mappings = {
"-top": _(["build.xml"]),
"-cpp": _(["components","tools","OmeroCpp","build.xml"]),
"-fs": _(["components","tools","OmeroFS","build.xml"]),
"-java": _(["components","tools","OmeroJava","build.xml"]),
"-py": _(["components","tools","OmeroPy","build.xml"]),
"-web": _(["components","tools","OmeroWeb","build.xml"]),
}
while len(args) > 0 and args[0] in mappings.keys()+["-perf"]:
if args[0] == "-perf":
args.pop(0)
A = "-listener net.sf.antcontrib.perf.AntPerformanceListener".split()
additions.extend(A)
elif args[0] == "-py":
args.pop(0)
F = os.path.sep.join(["components","tools","OmeroPy","build.xml"])
A = ["-f", F]
additions.extend(A)
elif args[0] == "-cpp":
args.pop(0)
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"])
elif args[0] in mappings.keys():
F = mappings[args.pop(0)]
A = ["-f", F]
additions.extend(A)
return additions + args
Expand Down

0 comments on commit 4d68058

Please sign in to comment.