summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/ant/templates/tool-windows.tmpl8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
index 19ea0bb677..fee4de72e2 100644
--- a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
+++ b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
@@ -8,6 +8,8 @@ rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
rem # PARTICULAR PURPOSE.
rem ##########################################################################
+setlocal enableextensions enabledelayedexpansion
+
set _LINE_TOOLCP=
:another_param
@@ -50,13 +52,13 @@ if "%_JAVA_OPTS%"=="" set _JAVA_OPTS=@javaflags@
set _TOOL_CLASSPATH=@classpath@
if "%_TOOL_CLASSPATH%"=="" (
- for %%f in ("%_SCALA_HOME%\lib\*") do call :add_cpath "%%f"
- for /d %%f in ("%_SCALA_HOME%\lib\*") do call :add_cpath "%%f"
+ for %%f in ("!_SCALA_HOME!\lib\*") do call :add_cpath "%%f"
+ for /d %%f in ("!_SCALA_HOME!\lib\*") do call :add_cpath "%%f"
)
if not "%_LINE_TOOLCP%"=="" call :add_cpath "%_LINE_TOOLCP%"
-set _PROPS=-Dscala.home="%_SCALA_HOME%" -Denv.emacs="%EMACS%" -Dscala.usejavacp=true @properties@
+set _PROPS=-Dscala.home="!_SCALA_HOME!" -Denv.emacs="%EMACS%" -Dscala.usejavacp=true @properties@
rem echo "%_JAVACMD%" %_JAVA_OPTS% %_PROPS% -cp "%_TOOL_CLASSPATH%" @class@ @toolflags@ %*
"%_JAVACMD%" %_JAVA_OPTS% %_PROPS% -cp "%_TOOL_CLASSPATH%" @class@ @toolflags@ %*