[m-rev.] diff: fix erlang grade build problem on Windows

Julien Fischer jfischer at opturion.com
Tue Jul 30 14:17:07 AEST 2013

Branches: 13.05, master

Fix a problem with the erlang grade on Windows.

 	Only keep the basename of ERLC and ERL if their initial values
 	are qualified with directories whose names contains spaces.  This
 	avoids build problems on Windows.  (We do the same thing for the
 	Java tools.)


diff --git a/m4/mercury.m4 b/m4/mercury.m4
index dc9fa2e..7ca48ca 100644
--- a/m4/mercury.m4
+++ b/m4/mercury.m4
@@ -619,8 +619,24 @@ else

+# On Windows, Erlang/OTP has a high chance of being installed in a path
+# containing spaces.  The simplest solution is to keep only the basename.
+# Everything will still work so long as the executables can be found on the
+# PATH later.
+case "$ERLC" in
+    *" "*)
+        ERLC=`basename "$ERLC"`
+        ;;
+case "$ERL" in 
+    *" "*)
+        ERL=`basename "$ERL"`
+        ;;


More information about the reviews mailing list