diff options
author | michelou <michelou@epfl.ch> | 2006-04-26 15:58:56 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2006-04-26 15:58:56 +0000 |
commit | 34b47d2a0b066c041ea07fe66b7bea94e6255000 (patch) | |
tree | fb6972b2d8502ee28fa14635164f840774725ba9 /src/compiler | |
parent | 692ce7bc6b15ce5fffee8709feafd6b1cd80ad0e (diff) | |
download | scala-34b47d2a0b066c041ea07fe66b7bea94e6255000.tar.gz scala-34b47d2a0b066c041ea07fe66b7bea94e6255000.tar.bz2 scala-34b47d2a0b066c041ea07fe66b7bea94e6255000.zip |
added subroutine 'set_home' in batch commands
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/ant/templates/generic-windows.tmpl | 15 | ||||
-rw-r--r-- | src/compiler/scala/tools/ant/templates/tool-windows.tmpl | 15 |
2 files changed, 20 insertions, 10 deletions
diff --git a/src/compiler/scala/tools/ant/templates/generic-windows.tmpl b/src/compiler/scala/tools/ant/templates/generic-windows.tmpl index a23422a7e4..5635d9a3ee 100644 --- a/src/compiler/scala/tools/ant/templates/generic-windows.tmpl +++ b/src/compiler/scala/tools/ant/templates/generic-windows.tmpl @@ -14,11 +14,7 @@ rem - Local batch variables start with an underscore ('_') if "%OS%"=="Windows_NT" ( @@setlocal - set _BIN_DIR= - for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi - set _SCALA_HOME=%_BIN_DIR%.. - rem The following works on WinXP SP2 or newer (http://support.microsoft.com/?kbid=833431) - rem set _SCALA_HOME=%~dsp0.. + call :set_home ) else ( set _SCALA_HOME=%SCALA_HOME% if "%_SCALA_HOME%"=="" goto error1 @@ -94,6 +90,15 @@ rem # subroutines ) goto :eof +rem Variable "%~dps0" works on WinXP SP2 or newer +rem (see http://support.microsoft.com/?kbid=833431) +rem set _SCALA_HOME=%~dps0.. +:set_home + set _BIN_DIR= + for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi + set _SCALA_HOME=%_BIN_DIR%.. +goto :eof + rem ########################################################################## rem # errors diff --git a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl index 8fcafb50a2..4a15430d50 100644 --- a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl +++ b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl @@ -14,11 +14,7 @@ rem - Local batch variables start with an underscore ('_') if "%OS%"=="Windows_NT" ( @@setlocal - set _BIN_DIR= - for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi - set _SCALA_HOME=%_BIN_DIR%.. - rem The following works on WinXP SP2 or newer (http://support.microsoft.com/?kbid=833431) - rem set _SCALA_HOME=%~dsp0.. + call :set_home ) else ( set _SCALA_HOME=%SCALA_HOME% if "%_SCALA_HOME%"=="" goto error1 @@ -73,6 +69,15 @@ rem # subroutines ) goto :eof +rem Variable "%~dps0" works on WinXP SP2 or newer +rem (see http://support.microsoft.com/?kbid=833431) +rem set _SCALA_HOME=%~dps0.. +:set_home + set _BIN_DIR= + for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi + set _SCALA_HOME=%_BIN_DIR%.. +goto :eof + rem ########################################################################## rem # errors |