Mercurial > hg > truffle
comparison mxtool/mx.py @ 17092:2f64a6c771d5
Backed out changeset: f0b55d0c5d2d
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 10 Sep 2014 11:04:13 +0200 |
parents | f0b55d0c5d2d |
children | ef5212ce8091 |
comparison
equal
deleted
inserted
replaced
17091:bd26b71aa5fc | 17092:2f64a6c771d5 |
---|---|
4098 mainSrc = True | 4098 mainSrc = True |
4099 for src in p.srcDirs: | 4099 for src in p.srcDirs: |
4100 srcDir = join(p.dir, src) | 4100 srcDir = join(p.dir, src) |
4101 if not exists(srcDir): | 4101 if not exists(srcDir): |
4102 os.mkdir(srcDir) | 4102 os.mkdir(srcDir) |
4103 ref = 'file.reference.' + p.name + '-' + src | |
4104 print >> out, ref + '=' + src | |
4103 if mainSrc: | 4105 if mainSrc: |
4104 print >> out, 'src.dir=' + srcDir | 4106 print >> out, 'src.dir=${' + ref + '}' |
4105 mainSrc = False | 4107 mainSrc = False |
4106 else: | 4108 else: |
4107 print >> out, 'src.' + src + '.dir=' + srcDir | 4109 print >> out, 'src.' + src + '.dir=${' + ref + '}' |
4108 | 4110 |
4109 javacClasspath = [] | 4111 javacClasspath = [] |
4110 | 4112 |
4111 deps = p.all_deps([], True) | 4113 deps = p.all_deps([], True) |
4112 annotationProcessorOnlyDeps = [] | 4114 annotationProcessorOnlyDeps = [] |
4123 if dep == p: | 4125 if dep == p: |
4124 continue | 4126 continue |
4125 | 4127 |
4126 if dep.isLibrary(): | 4128 if dep.isLibrary(): |
4127 path = dep.get_path(resolve=True) | 4129 path = dep.get_path(resolve=True) |
4128 libFiles.append(path) | 4130 if path: |
4131 if os.sep == '\\': | |
4132 path = path.replace('\\', '\\\\') | |
4133 ref = 'file.reference.' + dep.name + '-bin' | |
4134 print >> out, ref + '=' + path | |
4135 libFiles.append(path) | |
4129 | 4136 |
4130 elif dep.isProject(): | 4137 elif dep.isProject(): |
4131 path = join(dep.dir, 'dist', dep.name + '.jar') | 4138 n = dep.name.replace('.', '_') |
4132 | 4139 relDepPath = os.path.relpath(dep.dir, p.dir).replace(os.sep, '/') |
4133 if path: | 4140 ref = 'reference.' + n + '.jar' |
4134 if os.sep == '\\': | 4141 print >> out, 'project.' + n + '=' + relDepPath |
4135 path = path.replace('\\', '\\\\') | 4142 print >> out, ref + '=${project.' + n + '}/dist/' + dep.name + '.jar' |
4136 | 4143 |
4137 if not dep in annotationProcessorOnlyDeps: | 4144 if not dep in annotationProcessorOnlyDeps: |
4138 javacClasspath.append(path) | 4145 javacClasspath.append('${' + ref + '}') |
4139 else: | 4146 else: |
4140 annotationProcessorReferences.append(path) | 4147 annotationProcessorReferences.append('${' + ref + '}') |
4141 | 4148 |
4142 print >> out, 'javac.classpath=\\\n ' + (os.pathsep + '\\\n ').join(javacClasspath) | 4149 print >> out, 'javac.classpath=\\\n ' + (os.pathsep + '\\\n ').join(javacClasspath) |
4143 print >> out, 'javac.processorpath=' + (os.pathsep + '\\\n ').join(['${javac.classpath}'] + annotationProcessorReferences) | 4150 print >> out, 'javac.processorpath=' + (os.pathsep + '\\\n ').join(['${javac.classpath}'] + annotationProcessorReferences) |
4144 print >> out, 'javac.test.processorpath=' + (os.pathsep + '\\\n ').join(['${javac.test.classpath}'] + annotationProcessorReferences) | 4151 print >> out, 'javac.test.processorpath=' + (os.pathsep + '\\\n ').join(['${javac.test.classpath}'] + annotationProcessorReferences) |
4145 | 4152 |