Mercurial > hg > truffle
diff 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 |
line wrap: on
line diff
--- a/mxtool/mx.py Tue Sep 09 18:35:08 2014 -0700 +++ b/mxtool/mx.py Wed Sep 10 11:04:13 2014 +0200 @@ -4100,11 +4100,13 @@ srcDir = join(p.dir, src) if not exists(srcDir): os.mkdir(srcDir) + ref = 'file.reference.' + p.name + '-' + src + print >> out, ref + '=' + src if mainSrc: - print >> out, 'src.dir=' + srcDir + print >> out, 'src.dir=${' + ref + '}' mainSrc = False else: - print >> out, 'src.' + src + '.dir=' + srcDir + print >> out, 'src.' + src + '.dir=${' + ref + '}' javacClasspath = [] @@ -4125,19 +4127,24 @@ if dep.isLibrary(): path = dep.get_path(resolve=True) - libFiles.append(path) + if path: + if os.sep == '\\': + path = path.replace('\\', '\\\\') + ref = 'file.reference.' + dep.name + '-bin' + print >> out, ref + '=' + path + libFiles.append(path) elif dep.isProject(): - path = join(dep.dir, 'dist', dep.name + '.jar') - - if path: - if os.sep == '\\': - path = path.replace('\\', '\\\\') - - if not dep in annotationProcessorOnlyDeps: - javacClasspath.append(path) - else: - annotationProcessorReferences.append(path) + n = dep.name.replace('.', '_') + relDepPath = os.path.relpath(dep.dir, p.dir).replace(os.sep, '/') + ref = 'reference.' + n + '.jar' + print >> out, 'project.' + n + '=' + relDepPath + print >> out, ref + '=${project.' + n + '}/dist/' + dep.name + '.jar' + + if not dep in annotationProcessorOnlyDeps: + javacClasspath.append('${' + ref + '}') + else: + annotationProcessorReferences.append('${' + ref + '}') print >> out, 'javac.classpath=\\\n ' + (os.pathsep + '\\\n ').join(javacClasspath) print >> out, 'javac.processorpath=' + (os.pathsep + '\\\n ').join(['${javac.classpath}'] + annotationProcessorReferences)