Mercurial > hg > truffle
comparison mx/mx_graal.py @ 13522:44ecb4c8ed1f
mx: also copy files from bootstrap jdk
author | Bernhard Urban <bernhard.urban@jku.at> |
---|---|
date | Tue, 07 Jan 2014 14:48:45 +0200 |
parents | 0fbee3eb71f0 |
children | 137142009b0b |
comparison
equal
deleted
inserted
replaced
13521:56452e07874f | 13522:44ecb4c8ed1f |
---|---|
293 Get the JDK into which Graal is installed, creating it first if necessary. | 293 Get the JDK into which Graal is installed, creating it first if necessary. |
294 """ | 294 """ |
295 jdk = join(_jdksDir(), build) | 295 jdk = join(_jdksDir(), build) |
296 if create: | 296 if create: |
297 srcJdk = mx.java().jdk | 297 srcJdk = mx.java().jdk |
298 jdkContents = ['bin', 'include', 'jre', 'lib'] | 298 jdkContentsDirectories = ['bin', 'include', 'jre', 'lib'] |
299 jdkContentsFiles = ['COPYRIGHT', 'LICENSE', 'README.html', 'release', 'src.zip', 'THIRDPARTYLICENSEREADME-JAVAFX.txt', 'THIRDPARTYLICENSEREADME.txt'] | |
299 if exists(join(srcJdk, 'db')): | 300 if exists(join(srcJdk, 'db')): |
300 jdkContents.append('db') | 301 jdkContentsDirectories.append('db') |
301 if mx.get_os() != 'windows' and exists(join(srcJdk, 'man')): | 302 if mx.get_os() != 'windows' and exists(join(srcJdk, 'man')): |
302 jdkContents.append('man') | 303 jdkContentsDirectories.append('man') |
304 if exists(join(srcJdk, 'javafx-src.zip')): | |
305 jdkContentsFiles.append('javafx-src.zip') | |
303 if not exists(jdk): | 306 if not exists(jdk): |
304 mx.log('Creating ' + jdk + ' from ' + srcJdk) | 307 mx.log('Creating ' + jdk + ' from ' + srcJdk) |
305 os.makedirs(jdk) | 308 os.makedirs(jdk) |
306 for d in jdkContents: | 309 for d in jdkContentsDirectories: |
307 src = join(srcJdk, d) | 310 src = join(srcJdk, d) |
308 dst = join(jdk, d) | 311 dst = join(jdk, d) |
309 if not exists(src): | 312 if not exists(src): |
310 mx.abort('Host JDK directory is missing: ' + src) | 313 mx.abort('Host JDK directory is missing: ' + src) |
311 shutil.copytree(src, dst) | 314 shutil.copytree(src, dst) |
315 for f in jdkContentsFiles: | |
316 src = join(srcJdk, f) | |
317 dst = join(jdk, f) | |
318 if not exists(src): | |
319 mx.abort('Host JDK file is missing: ' + src) | |
320 shutil.copyfile(src, dst) | |
312 | 321 |
313 # Make a copy of the default VM so that this JDK can be | 322 # Make a copy of the default VM so that this JDK can be |
314 # reliably used as the bootstrap for a HotSpot build. | 323 # reliably used as the bootstrap for a HotSpot build. |
315 jvmCfg = _vmCfgInJdk(jdk) | 324 jvmCfg = _vmCfgInJdk(jdk) |
316 if not exists(jvmCfg): | 325 if not exists(jvmCfg): |