comparison mxtool/mx.py @ 15122:11a591a99515

mx: fixed bug in exportlibs
author Doug Simon <doug.simon@oracle.com>
date Tue, 15 Apr 2014 21:35:37 +0200
parents 3a1f48125f53
children f0fc09c0845e
comparison
equal deleted inserted replaced
15121:2af51b43a85c 15122:11a591a99515
3615 3615
3616 moduleXml = XMLDoc() 3616 moduleXml = XMLDoc()
3617 moduleXml.open('module', attributes={'type': 'JAVA_MODULE', 'version': '4'}) 3617 moduleXml.open('module', attributes={'type': 'JAVA_MODULE', 'version': '4'})
3618 3618
3619 moduleXml.open('component', attributes={'name': 'NewModuleRootManager', 'LANGUAGE_LEVEL': intellijLanguageLevel, 'inherit-compiler-output': 'false'}) 3619 moduleXml.open('component', attributes={'name': 'NewModuleRootManager', 'LANGUAGE_LEVEL': intellijLanguageLevel, 'inherit-compiler-output': 'false'})
3620 moduleXml.element('output', attributes={'url': 'file://$MODULE_DIR$/bin'}) # TODO use p.output_dir() ? 3620 moduleXml.element('output', attributes={'url': 'file://$MODULE_DIR$/bin'})
3621 moduleXml.element('exclude-output') 3621 moduleXml.element('exclude-output')
3622 3622
3623 moduleXml.open('content', attributes={'url': 'file://$MODULE_DIR$'}) 3623 moduleXml.open('content', attributes={'url': 'file://$MODULE_DIR$'})
3624 for src in p.srcDirs: 3624 for src in p.srcDirs:
3625 srcDir = join(p.dir, src) 3625 srcDir = join(p.dir, src)
4335 with open(path, 'rb') as f: 4335 with open(path, 'rb') as f:
4336 while True: 4336 while True:
4337 buf = f.read(4096) 4337 buf = f.read(4096)
4338 if not buf: 4338 if not buf:
4339 break 4339 break
4340 d.update(buf) 4340 d.update(buf)
4341 with open(path + '.' + suffix, 'w') as fp: 4341 with open(path + '.' + suffix, 'w') as fp:
4342 fp.write(d.hexdigest()) 4342 print >> fp, d.hexdigest()
4343 log('created ' + path + '.' + suffix) 4343 log('created ' + path + '.' + suffix)
4344 4344
4345 digest(args.sha1, path, hashlib.sha1, 'sha1') 4345 digest(args.sha1, path, hashlib.sha1, 'sha1')
4346 digest(args.md5, path, hashlib.md5, 'md5') 4346 digest(args.md5, path, hashlib.md5, 'md5')
4347 4347