diff options
author | William Deegan <bill@baddogconsulting.com> | 2018-10-02 21:20:00 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2018-10-02 21:20:00 (GMT) |
commit | 7cae39dc41ee3ff6becb53dbc8c426eddff9b8ac (patch) | |
tree | 5a95b6c8a035aae298c901829fbc196fd6036d05 /src/engine/SCons/Tool/javac.py | |
parent | 98dfcef355d8d68360fde70afb52bc4250b1926b (diff) | |
download | SCons-7cae39dc41ee3ff6becb53dbc8c426eddff9b8ac.zip SCons-7cae39dc41ee3ff6becb53dbc8c426eddff9b8ac.tar.gz SCons-7cae39dc41ee3ff6becb53dbc8c426eddff9b8ac.tar.bz2 |
Fixes for Java tests on win32
Diffstat (limited to 'src/engine/SCons/Tool/javac.py')
-rw-r--r-- | src/engine/SCons/Tool/javac.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/engine/SCons/Tool/javac.py b/src/engine/SCons/Tool/javac.py index 08d3d2f..0d627a1 100644 --- a/src/engine/SCons/Tool/javac.py +++ b/src/engine/SCons/Tool/javac.py @@ -209,12 +209,18 @@ def generate(env): env.AddMethod(Java) if env['PLATFORM'] == 'win32': - # Ensure that we have a proper path for clang - clang = SCons.Tool.find_program_path(env, 'javac', - default_paths=get_java_install_dirs(env['PLATFORM'])) - if clang: - clang_bin_dir = os.path.dirname(clang) - env.AppendENVPath('PATH', clang_bin_dir) + # Ensure that we have a proper path for javac + version = env.get('JAVAVERSION', None) + # import pdb; pdb.set_trace() + paths=get_java_install_dirs(env['PLATFORM'], version=version) + # print("JAVA PATHS:%s"%paths) + javac = SCons.Tool.find_program_path(env, 'javac', + default_paths=paths) + if javac: + javac_bin_dir = os.path.dirname(javac) + env.AppendENVPath('PATH', javac_bin_dir) + java_inc_dir = os.path.normpath(os.path.join(javac_bin_dir,'..','include')) + env['JAVAINCLUDES'] = [ java_inc_dir, os.path.join(java_inc_dir,'win32')] env['JAVAC'] = 'javac' env['JAVACFLAGS'] = SCons.Util.CLVar('') |