[m-rev.] diff: fix another bug with the Java grade, --use-grade-subdirs and Windows

Julien Fischer jfischer at opturion.com
Fri Jul 17 16:52:04 AEST 2015


Fix another bug with the Java grade, --use-grade-subdirs and Windows.

When --use-grade-subdirs was enabled the compiler was incorrectly looking for
wrapper batch files generated in the Java grade in the 'bin' directory rather
than the 'bats' directory.  This was due to the file extension for the wrapper
scripts not being set correctly; the fix is to set it correctly.
(Patch from Sebastian Godelet.)

compiler/compile_target_code.m:
 	As above.

diff --git a/compiler/compile_target_code.m b/compiler/compile_target_code.m
index 82f4a91..eb2c280 100644
--- a/compiler/compile_target_code.m
+++ b/compiler/compile_target_code.m
@@ -2652,12 +2652,10 @@ post_link_make_symlink_or_copy(ErrorStream, LinkTargetType, ModuleName,
              )
          then
              ScriptExt = get_launcher_script_extension(Globals),
-            module_name_to_file_name(Globals, ModuleName, "",
-                do_not_create_dirs, OutputScriptName0, !IO),
-            OutputScriptName = OutputScriptName0 ++ ScriptExt,
-            module_name_to_file_name(NoSubdirGlobals, ModuleName, "",
-                do_not_create_dirs, UserDirScriptName0, !IO),
-            UserDirScriptName = UserDirScriptName0 ++ ScriptExt,
+            module_name_to_file_name(Globals, ModuleName, ScriptExt,
+                do_not_create_dirs, OutputScriptName, !IO),
+            module_name_to_file_name(NoSubdirGlobals, ModuleName, ScriptExt,
+                do_not_create_dirs, UserDirScriptName, !IO),

              same_timestamp(OutputScriptName, UserDirScriptName,
                  ScriptSameTimestamp, !IO),



More information about the reviews mailing list