changeset 13923:1472b8d3f142

abort if bad --jdt argument given to 'mx build; command
author Doug Simon <doug.simon@oracle.com>
date Tue, 11 Feb 2014 16:31:53 +0100
parents 0995dcbd6dd8
children d766ec8ce4b1
files mxtool/mx.py
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mxtool/mx.py	Mon Feb 10 14:38:42 2014 -0500
+++ b/mxtool/mx.py	Tue Feb 11 16:31:53 2014 +0100
@@ -1567,11 +1567,15 @@
 
     jdtJar = None
     if args.jdt is not None:
-        if args.jdt.endswith('.jar'):
-            jdtJar = args.jdt
-            if not exists(jdtJar) and os.path.abspath(jdtJar) == os.path.abspath(defaultEcjPath) and get_env('JDT', None) is None:
-                # Silently ignore JDT if default location is used but not ecj.jar exists there
+        if not args.jdt.endswith('.jar'):
+            abort('Path for Eclipse batch compiler does not look like a jar file: ' + args.jdt)
+        jdtJar = args.jdt
+        if not exists(jdtJar):
+            if os.path.abspath(jdtJar) == os.path.abspath(defaultEcjPath) and get_env('JDT', None) is None:
+                # Silently ignore JDT if default location is used but does not exist
                 jdtJar = None
+            else:
+                abort('Eclipse batch compiler jar does not exist: ' + args.jdt)
 
     built = set()