comparison mx/mx_graal.py @ 13525:7cbd4f2194aa

mx: omit weird logic to copy bootstrap jdk, just do cp -R
author Bernhard Urban <bernhard.urban@jku.at>
date Tue, 07 Jan 2014 21:46:56 +0100
parents dfb843a0a76d
children 8602fcb6ceb3
comparison
equal deleted inserted replaced
13524:dfb843a0a76d 13525:7cbd4f2194aa
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 jdkContentsDirectories = ['bin', 'include', 'jre', 'lib']
299 jdkContentsFiles = ['ASSEMBLY_EXCEPTION', 'COPYRIGHT', 'LICENSE', 'javafx-src.zip', 'README.html', 'release', 'src.zip', 'THIRDPARTYLICENSEREADME-JAVAFX.txt', 'THIRDPARTYLICENSEREADME.txt', 'THIRD_PARTY_README']
300 if exists(join(srcJdk, 'db')):
301 jdkContentsDirectories.append('db')
302 if mx.get_os() != 'windows' and exists(join(srcJdk, 'man')):
303 jdkContentsDirectories.append('man')
304 if not exists(jdk): 298 if not exists(jdk):
305 mx.log('Creating ' + jdk + ' from ' + srcJdk) 299 mx.log('Creating ' + jdk + ' from ' + srcJdk)
306 os.makedirs(jdk) 300 shutil.copytree(srcJdk, jdk)
307 for d in jdkContentsDirectories:
308 src = join(srcJdk, d)
309 dst = join(jdk, d)
310 if not exists(src):
311 mx.abort('Host JDK directory is missing: ' + src)
312 shutil.copytree(src, dst)
313 for f in jdkContentsFiles:
314 src = join(srcJdk, f)
315 if exists(src):
316 dst = join(jdk, f)
317 shutil.copyfile(src, dst)
318 elif mx._opts.verbose:
319 mx.log('Host JDK file is missing: ' + src)
320 301
321 # Make a copy of the default VM so that this JDK can be 302 # Make a copy of the default VM so that this JDK can be
322 # reliably used as the bootstrap for a HotSpot build. 303 # reliably used as the bootstrap for a HotSpot build.
323 jvmCfg = _vmCfgInJdk(jdk) 304 jvmCfg = _vmCfgInJdk(jdk)
324 if not exists(jvmCfg): 305 if not exists(jvmCfg):