Mercurial > hg > graal-compiler
changeset 9119:0c9c4ae236b2
refactoring to ensure the path to the JDKs dir is consistent between the _jdk() and clean() command
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 15 Apr 2013 14:43:35 +0200 |
parents | 35e31499ae9e |
children | 9f361c0f912b |
files | mx/commands.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mx/commands.py Mon Apr 15 14:31:24 2013 +0200 +++ b/mx/commands.py Mon Apr 15 14:43:35 2013 +0200 @@ -80,7 +80,7 @@ rmIfExists(join(_graal_home, 'build')) rmIfExists(join(_graal_home, 'build-nograal')) - rmIfExists(join(_graal_home, 'jdk' + str(mx.java().version))) + rmIfExists(_jdksDir()) rmIfExists(mx.distribution('GRAAL').path) def export(args): @@ -302,11 +302,14 @@ return join(jdk, 'jre', 'lib', _arch(), 'jvm.cfg') return join(_vmLibDirInJdk(jdk), 'jvm.cfg') +def _jdksDir(): + return join(_graal_home, 'jdk' + str(mx.java().version)) + def _jdk(build='product', vmToCheck=None, create=False): """ Get the JDK into which Graal is installed, creating it first if necessary. """ - jdk = join(_graal_home, 'jdk' + str(mx.java().version), build) + jdk = join(_jdksDir(), build) srcJdk = mx.java().jdk jdkContents = ['bin', 'include', 'jre', 'lib'] if exists(join(srcJdk, 'db')):