Mercurial > hg > truffle
comparison mx/commands.py @ 7925:c7d7d9936809
use zipfile module instead of an external call to jar for creating jar files from projects
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 05 Mar 2013 15:20:35 +0100 |
parents | 9bff64f43299 |
children | 394f685c1502 |
comparison
equal
deleted
inserted
replaced
7924:b6a87711eca0 | 7925:c7d7d9936809 |
---|---|
1094 out = args[0] | 1094 out = args[0] |
1095 elif len(args) > 1: | 1095 elif len(args) > 1: |
1096 mx.abort('jacocoreport takes only one argument : an output directory') | 1096 mx.abort('jacocoreport takes only one argument : an output directory') |
1097 mx.run_java(['-jar', jacocoreport.get_path(True), '-in', 'jacoco.exec', '-g', join(_graal_home, 'graal'), out]) | 1097 mx.run_java(['-jar', jacocoreport.get_path(True), '-in', 'jacoco.exec', '-g', join(_graal_home, 'graal'), out]) |
1098 | 1098 |
1099 def jar(args): | |
1100 parser = ArgumentParser(prog='mx jar'); | |
1101 parser.add_argument('projects', nargs=REMAINDER, metavar='projects...') | |
1102 args = parser.parse_args(args) | |
1103 | |
1104 if not args.projects: | |
1105 mx.abort('Please specify at least one project to jar.') | |
1106 | |
1107 for pname in args.projects: | |
1108 p = mx.project(pname, fatalIfMissing=True) | |
1109 outputDir = p.output_dir() | |
1110 targetJar = join(p.dir, p.name + '.jar') | |
1111 mx.jar(targetJar, [outputDir]) | |
1112 | |
1113 def site(args): | 1099 def site(args): |
1114 """create a website containing javadoc and the project dependency graph""" | 1100 """create a website containing javadoc and the project dependency graph""" |
1115 | 1101 |
1116 return mx.site(['--name', 'Graal', | 1102 return mx.site(['--name', 'Graal', |
1117 '--jd', '@-tag', '--jd', '@test:X', | 1103 '--jd', '@-tag', '--jd', '@test:X', |
1134 'igv' : [igv, ''], | 1120 'igv' : [igv, ''], |
1135 'jdkhome': [jdkhome, ''], | 1121 'jdkhome': [jdkhome, ''], |
1136 'dacapo': [dacapo, '[[n] benchmark] [VM options|@DaCapo options]'], | 1122 'dacapo': [dacapo, '[[n] benchmark] [VM options|@DaCapo options]'], |
1137 'scaladacapo': [scaladacapo, '[[n] benchmark] [VM options|@Scala DaCapo options]'], | 1123 'scaladacapo': [scaladacapo, '[[n] benchmark] [VM options|@Scala DaCapo options]'], |
1138 'specjvm2008': [specjvm2008, '[VM options|@specjvm2008 options]'], | 1124 'specjvm2008': [specjvm2008, '[VM options|@specjvm2008 options]'], |
1139 'jar': [jar, '[-options]'], | |
1140 #'example': [example, '[-v] example names...'], | 1125 #'example': [example, '[-v] example names...'], |
1141 'gate' : [gate, '[-options]'], | 1126 'gate' : [gate, '[-options]'], |
1142 'gv' : [gv, ''], | 1127 'gv' : [gv, ''], |
1143 'bench' : [bench, '[-resultfile file] [all(default)|dacapo|specjvm2008|bootstrap]'], | 1128 'bench' : [bench, '[-resultfile file] [all(default)|dacapo|specjvm2008|bootstrap]'], |
1144 'unittest' : [unittest, '[filters...]'], | 1129 'unittest' : [unittest, '[filters...]'], |