Mercurial > hg > graal-jvmci-8
diff mxtool/mx.py @ 8991:096725f4da58
the -e option to the eclipseformat can now also accept an Eclipse installation directory
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 10 Apr 2013 13:21:41 +0200 |
parents | 64d3d352f943 |
children | 7844a36d0216 |
line wrap: on
line diff
--- a/mxtool/mx.py Wed Apr 10 11:26:50 2013 +0200 +++ b/mxtool/mx.py Wed Apr 10 13:21:41 2013 +0200 @@ -1561,6 +1561,13 @@ args.eclipse_exe = os.environ.get('ECLIPSE_EXE') if args.eclipse_exe is None: abort('Could not find Eclipse executable. Use -e option or ensure ECLIPSE_EXE environment variable is set.') + + # Maybe an Eclipse installation dir was specified - look for the executable in it + if join(args.eclipse_exe, exe_suffix('eclipse')): + args.eclipse_exe = join(args.eclipse_exe, exe_suffix('eclipse')) + + if not os.path.isfile(args.eclipse_exe) or not os.access(args.eclipse_exe, os.X_OK): + abort('Not an executable file: ' + args.eclipse_exe) eclipseinit([], buildProcessorJars=False)