Mercurial > hg > graal-jvmci-8
comparison mx/mx_graal.py @ 14938:9d32e87ea98b
GRAAL distribution now includes sources (graal.src.zip)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 02 Apr 2014 10:05:08 +0200 |
parents | 5c7718ae8c86 |
children | c64cd1dd4bd1 |
comparison
equal
deleted
inserted
replaced
14937:3de340bdb8d3 | 14938:9d32e87ea98b |
---|---|
404 graalJar = graalDist.path | 404 graalJar = graalDist.path |
405 jdks = _jdksDir() | 405 jdks = _jdksDir() |
406 | 406 |
407 m2Install = mx.get_env('MAVEN_INSTALL_GRAAL_JAR', None) | 407 m2Install = mx.get_env('MAVEN_INSTALL_GRAAL_JAR', None) |
408 if m2Install and m2Install.lower() == 'true': | 408 if m2Install and m2Install.lower() == 'true': |
409 mx.run(['mvn', 'install:install-file', '-q', | 409 cmd = ['mvn', 'install:install-file', '-q', |
410 '-Dfile=' + graalJar, '-DgroupId=com.oracle.graal', '-DartifactId=graal', | 410 '-Dfile=' + graalJar, '-DgroupId=com.oracle.graal', '-DartifactId=graal', |
411 '-Dversion=1.0-SNAPSHOT', '-Dpackaging=jar']) | 411 '-Dversion=1.0-SNAPSHOT', '-Dpackaging=jar'] |
412 if graalDist.sourcesPath: | |
413 cmd = cmd + ['-Dsources=' + graalDist.sourcesPath] | |
414 mx.run(cmd) | |
412 | 415 |
413 if exists(jdks): | 416 if exists(jdks): |
414 for e in os.listdir(jdks): | 417 for e in os.listdir(jdks): |
415 jreLibDir = join(jdks, e, 'jre', 'lib') | 418 jreLibDir = join(jdks, e, 'jre', 'lib') |
416 if exists(jreLibDir): | 419 if exists(jreLibDir): |
417 # do a copy and then a move to get atomic updating (on Unix) of graal.jar in the JRE | 420 def install(srcJar, dstDir): |
418 fd, tmp = tempfile.mkstemp(suffix='', prefix='graal.jar', dir=jreLibDir) | 421 # do a copy and then a move to get atomic updating (on Unix) |
419 shutil.copyfile(graalJar, tmp) | 422 name = os.path.basename(srcJar) |
420 os.close(fd) | 423 fd, tmp = tempfile.mkstemp(suffix='', prefix=name, dir=dstDir) |
421 graalJar = join(jreLibDir, 'graal.jar') | 424 shutil.copyfile(srcJar, tmp) |
422 shutil.move(tmp, graalJar) | 425 os.close(fd) |
423 os.chmod(graalJar, JDK_UNIX_PERMISSIONS) | 426 dstJar = join(dstDir, name) |
427 shutil.move(tmp, dstJar) | |
428 os.chmod(dstJar, JDK_UNIX_PERMISSIONS) | |
429 | |
430 install(graalJar, jreLibDir) | |
431 if graalDist.sourcesPath: | |
432 install(graalDist.sourcesPath, join(jdks, e)) | |
424 | 433 |
425 # run a command in the windows SDK Debug Shell | 434 # run a command in the windows SDK Debug Shell |
426 def _runInDebugShell(cmd, workingDir, logFile=None, findInOutput=None, respondTo=None): | 435 def _runInDebugShell(cmd, workingDir, logFile=None, findInOutput=None, respondTo=None): |
427 if respondTo is None: | 436 if respondTo is None: |
428 respondTo = {} | 437 respondTo = {} |