summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-11-13 01:56:45 +0000
committerPaul Phillips <paulp@improving.org>2011-11-13 01:56:45 +0000
commit0c4ad65950b99a310d210f2158e091997099fe1c (patch)
tree662f25db36aeff4eca0fa20ebbd5d600cce3fd1e /src/compiler/scala/tools/ant/templates/tool-windows.tmpl
parentbc2bd6e67afd96e99c48347e69d9dd9a4743b808 (diff)
downloadscala-0c4ad65950b99a310d210f2158e091997099fe1c.tar.gz
scala-0c4ad65950b99a310d210f2158e091997099fe1c.tar.bz2
scala-0c4ad65950b99a310d210f2158e091997099fe1c.zip
Delayed expansion in scala.bat.
Closes SI-4019.
Diffstat (limited to 'src/compiler/scala/tools/ant/templates/tool-windows.tmpl')
-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@ %*