ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbaill...@apache.org
Subject cvs commit: jakarta-ant/src/script ant.bat antRun.bat lcp.bat
Date Mon, 19 Aug 2002 17:55:13 GMT
sbailliez    2002/08/19 10:55:13

  Modified:    src/script Tag: ANT_15_BRANCH ant.bat antRun.bat lcp.bat
  Log:
  Back merge from HEAD
  Patrick Luby's patches.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.18.2.1  +29 -49    jakarta-ant/src/script/ant.bat
  
  Index: ant.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/script/ant.bat,v
  retrieving revision 1.18
  retrieving revision 1.18.2.1
  diff -u -r1.18 -r1.18.2.1
  --- ant.bat	2 Apr 2002 07:49:08 -0000	1.18
  +++ ant.bat	19 Aug 2002 17:55:13 -0000	1.18.2.1
  @@ -5,48 +5,31 @@
   
   if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
   
  -if not "%OS%"=="Windows_NT" goto win9xStart
  -:winNTStart
  -@setlocal
  +if "%OS%"=="Windows_NT" @setlocal
   
  -rem %~dp0 is name of current script under NT
  -set DEFAULT_ANT_HOME=%~dp0
  -
  -rem : operator works similar to make : operator
  -set DEFAULT_ANT_HOME=%DEFAULT_ANT_HOME%\..
  +rem %~dp0 is expanded pathname of the current script under NT
  +set DEFAULT_ANT_HOME=%~dp0..
   
   if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
   set DEFAULT_ANT_HOME=
   
  -rem Need to check if we are using the 4NT shell...
  -if "%@eval[2+2]" == "4" goto setup4NT
  -
  -rem On NT/2K grab all arguments at once
  -set ANT_CMD_LINE_ARGS=%*
  -goto doneStart
  -
  -:setup4NT
  -set ANT_CMD_LINE_ARGS=%$
  -goto doneStart
  -
  -:win9xStart
  -rem Slurp the command line arguments.  This loop allows for an unlimited number of 
  -rem agruments (up to the command line limit, anyway).
  -
  -set ANT_CMD_LINE_ARGS=
  -
  +rem Slurp the command line arguments. This loop allows for an unlimited number
  +rem of arguments (up to the command line limit, anyway).
  +set ANT_CMD_LINE_ARGS=%1
  +if ""%1""=="""" goto doneStart
  +shift
   :setupArgs
  -if %1a==a goto doneStart
  +if ""%1""=="""" goto doneStart
   set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
   shift
   goto setupArgs
  -
  -:doneStart
   rem This label provides a place for the argument list loop to break out 
   rem and for NT handling to skip to.
  +:doneStart
   
  -rem find ANT_HOME
  -if not "%ANT_HOME%"=="" goto checkJava
  +rem find ANT_HOME if it does not exist due to either an invalid value passed
  +rem by the user or the %0 problem on Windows 9x
  +if exist "%ANT_HOME%" goto checkJava
   
   rem check for ant in Program Files on system drive
   if not exist "%SystemDrive%\Program Files\ant" goto checkSystemDrive
  @@ -66,48 +49,45 @@
   goto checkJava
   
   :noAntHome
  -echo ANT_HOME is not set and ant could not be located. Please set ANT_HOME.
  +echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
   goto end
   
   :checkJava
  -set _JAVACMD=%JAVACMD%
   set LOCALCLASSPATH=%CLASSPATH%
   for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat" %%i
   
  -if "%JAVA_HOME%" == "" goto noJavaHome
  -if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java
  -if not exist "%_JAVACMD%.exe" echo Error: "%_JAVACMD%.exe" not found - check JAVA_HOME
&& goto end
  -if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat" %JAVA_HOME%\lib\tools.jar
  -if exist "%JAVA_HOME%\lib\classes.zip" call "%ANT_HOME%\bin\lcp.bat" %JAVA_HOME%\lib\classes.zip
  -goto checkJikes
  -
  -:noJavaHome
  -if "%_JAVACMD%" == "" set _JAVACMD=java
  -echo.
  +if exist "%JAVA_HOME%\bin\java.exe" goto gotJava
  +echo
   echo Warning: JAVA_HOME environment variable is not set.
   echo   If build fails because sun.* classes could not be found
   echo   you will need to set the JAVA_HOME environment variable
   echo   to the installation directory of java.
  -echo.
  +echo
  +
  +:gotJava
  +set _JAVACMD=%JAVA_HOME%\bin\java.exe
  +if exist "%_JAVACMD%" goto checkJikes
  +set _JAVACMD=java.exe
  +if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat" %JAVA_HOME%\lib\tools.jar
  +if exist "%JAVA_HOME%\lib\classes.zip" call "%ANT_HOME%\bin\lcp.bat" %JAVA_HOME%\lib\classes.zip
   
   :checkJikes
  -if not "%JIKESPATH%" == "" goto runAntWithJikes
  +if not "%JIKESPATH%"=="" goto runAntWithJikes
   
   :runAnt
  -"%_JAVACMD%" -classpath "%LOCALCLASSPATH%" -Dant.home="%ANT_HOME%" %ANT_OPTS% org.apache.tools.ant.Main
%ANT_ARGS% %ANT_CMD_LINE_ARGS%
  +"%_JAVACMD%" -classpath "%LOCALCLASSPATH%" "-Dant.home=%ANT_HOME%" %ANT_OPTS% org.apache.tools.ant.Main
%ANT_CMD_LINE_ARGS%
   goto end
   
   :runAntWithJikes
  -"%_JAVACMD%" -classpath "%LOCALCLASSPATH%" -Dant.home="%ANT_HOME%" -Djikes.class.path="%JIKESPATH%"
%ANT_OPTS% org.apache.tools.ant.Main %ANT_ARGS% %ANT_CMD_LINE_ARGS%
  +"%_JAVACMD%" -classpath "%LOCALCLASSPATH%" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%"
%ANT_OPTS% org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
  +goto end
   
   :end
   set LOCALCLASSPATH=
   set _JAVACMD=
   set ANT_CMD_LINE_ARGS=
   
  -if not "%OS%"=="Windows_NT" goto mainEnd
  -:winNTend
  -@endlocal
  +if not "%OS%"=="Windows_NT" @endlocal
   
   :mainEnd
   if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
  
  
  
  1.4.2.1   +19 -11    jakarta-ant/src/script/antRun.bat
  
  Index: antRun.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/script/antRun.bat,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- antRun.bat	10 Jan 2002 14:18:42 -0000	1.4
  +++ antRun.bat	19 Aug 2002 17:55:13 -0000	1.4.2.1
  @@ -1,23 +1,31 @@
   @echo off
   
  -REM   Copyright (c) 2001 The Apache Software Foundation.  All rights
  +REM   Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
   REM   reserved.
   
  -rem Change drive and directory to %1 (Win9X only for NT/2K use "cd /d")
  -cd %1
  -%1\
  -set ANT_RUN_CMD=%2
  -shift
  +if "%OS%"=="Windows_NT" @setlocal
  +
  +if ""%1""=="""" goto runCommand
  +
  +rem Change drive and directory to %1
  +if "%OS%"=="Windows_NT" cd /d ""%1""
  +if not "%OS%"=="Windows_NT" cd ""%1""
   shift
   
  -set PARAMS=
  +rem Slurp the command line arguments. This loop allows for an unlimited number
  +rem of agruments (up to the command line limit, anyway).
  +set ANT_RUN_CMD=%1
  +if ""%1""=="""" goto runCommand
  +shift
   :loop
  -if ""%1 == "" goto runCommand
  -set PARAMS=%PARAMS% %1
  +if ""%1""=="""" goto runCommand
  +set ANT_RUN_CMD=%ANT_RUN_CMD% %1
   shift
   goto loop
   
   :runCommand
  -rem echo %ANT_RUN_CMD% %PARAMS%
  -%ANT_RUN_CMD% %PARAMS%
  +rem echo %ANT_RUN_CMD%
  +%ANT_RUN_CMD%
  +
  +if "%OS%"=="Windows_NT" @endlocal
   
  
  
  
  1.3.2.1   +7 -3      jakarta-ant/src/script/lcp.bat
  
  Index: lcp.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/script/lcp.bat,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- lcp.bat	10 Jan 2002 14:18:42 -0000	1.3
  +++ lcp.bat	19 Aug 2002 17:55:13 -0000	1.3.2.1
  @@ -1,12 +1,16 @@
  -REM   Copyright (c) 2001 The Apache Software Foundation.  All rights
  +REM   Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
   REM   reserved.
   
   set _CLASSPATHCOMPONENT=%1
  -:argCheck
  -if %2a==a goto gotAllArgs
  +if ""%1""=="""" goto gotAllArgs
   shift
  +
  +:argCheck
  +if ""%1""=="""" goto gotAllArgs
   set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1
  +shift
   goto argCheck
  +
   :gotAllArgs
   set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message