Mercurial > hg > graal-jvmci-8
comparison mx.jvmci/mx_jvmci_makefile.py @ 22287:5cce6c398d70
re-introduced partOfHotSpot to JarJDKDeployedDist to fix mx_jvmci_makefile.py
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 23 Jul 2015 15:21:13 +0200 |
parents | c232a2ea1fd2 |
children | 26e2a05f8d95 |
comparison
equal
deleted
inserted
replaced
22286:2ecfec90e51e | 22287:5cce6c398d70 |
---|---|
51 parser.add_argument('-o', action='store', dest='output', help='Write contents to this file.') | 51 parser.add_argument('-o', action='store', dest='output', help='Write contents to this file.') |
52 parser.add_argument('selectedDists', help="Selected distribution names which are going to be built with make.", nargs=REMAINDER) | 52 parser.add_argument('selectedDists', help="Selected distribution names which are going to be built with make.", nargs=REMAINDER) |
53 opts = parser.parse_args(args) | 53 opts = parser.parse_args(args) |
54 | 54 |
55 if not opts.selectedDists: | 55 if not opts.selectedDists: |
56 opts.selectedDists = [d.name for d in mx_jvmci.jdkDeployedDists if d.partOfHotSpot] | 56 opts.selectedDists = [d.dist() for d in mx_jvmci.jdkDeployedDists if isinstance(d, mx_jvmci.JarJDKDeployedDist) and d.partOfHotSpot] |
57 else: | |
58 opts.selectedDists = [mx.distribution(name) for name in opts.selectedDists] | |
57 mf = Makefile() | 59 mf = Makefile() |
58 if do_build_makefile(mf, opts.selectedDists): | 60 if do_build_makefile(mf, opts.selectedDists): |
59 contents = mf.generate() | 61 contents = mf.generate() |
60 if opts.output == None: | 62 if opts.output == None: |
61 print contents | 63 print contents |
63 if mx.update_file(opts.output, contents, showDiff=True): | 65 if mx.update_file(opts.output, contents, showDiff=True): |
64 return 1 | 66 return 1 |
65 return 0 | 67 return 0 |
66 | 68 |
67 def get_jdk_deployed_dists(): | 69 def get_jdk_deployed_dists(): |
68 return [d.name for d in mx_jvmci.jdkDeployedDists] | 70 return [d.dist() for d in mx_jvmci.jdkDeployedDists] |
69 | 71 |
70 def make_dist_rule(dist, mf): | 72 def make_dist_rule(dist, mf): |
71 def path_dist_relative(p): | 73 def path_dist_relative(p): |
72 return os.path.relpath(p, dist.suite.dir) | 74 return os.path.relpath(p, dist.suite.dir) |
73 jdkDeployedDists = get_jdk_deployed_dists() | 75 jdkDeployedDists = get_jdk_deployed_dists() |
100 apDistVariableNames = [] | 102 apDistVariableNames = [] |
101 for apd in sorted(annotationProcessorDeps): | 103 for apd in sorted(annotationProcessorDeps): |
102 apPaths.append(path_dist_relative(apd.path)) | 104 apPaths.append(path_dist_relative(apd.path)) |
103 apDistNames.append(apd.name) | 105 apDistNames.append(apd.name) |
104 apDistVariableNames.append("$(" + apd.name + "_JAR)") | 106 apDistVariableNames.append("$(" + apd.name + "_JAR)") |
105 shouldExport = dist.name in jdkDeployedDists | 107 shouldExport = dist in jdkDeployedDists |
106 props = { | 108 props = { |
107 "name": dist.name, | 109 "name": dist.name, |
108 "jarName": targetPathPrefix + jarName, | 110 "jarName": targetPathPrefix + jarName, |
109 "depJarsVariableAccess": "$(" + depJarVariableName + ")" if len(classPath) > 0 else "", | 111 "depJarsVariableAccess": "$(" + depJarVariableName + ")" if len(classPath) > 0 else "", |
110 "depJarsVariable": depJarVariableName, | 112 "depJarsVariable": depJarVariableName, |