root/release-kits/lirk3/bin/apache-ant-1.6.5/bootstrap/bin/ant.bat @ 14982

Revision 14982, 4.1 KB (checked in by oranfry, 11 years ago)

initial import of LiRK3

Line 
1@echo off
2
3REM  Copyright 2001,2004-2005 The Apache Software Foundation
4REM
5REM  Licensed under the Apache License, Version 2.0 (the "License");
6REM  you may not use this file except in compliance with the License.
7REM  You may obtain a copy of the License at
8REM
9REM      http://www.apache.org/licenses/LICENSE-2.0
10REM
11REM  Unless required by applicable law or agreed to in writing, software
12REM  distributed under the License is distributed on an "AS IS" BASIS,
13REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14REM  See the License for the specific language governing permissions and
15REM  limitations under the License.
16
17if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
18
19if "%OS%"=="Windows_NT" @setlocal
20if "%OS%"=="WINNT" @setlocal
21
22rem %~dp0 is expanded pathname of the current script under NT
23set DEFAULT_ANT_HOME=%~dp0..
24
25if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
26set DEFAULT_ANT_HOME=
27
28set _USE_CLASSPATH=yes
29
30rem Slurp the command line arguments. This loop allows for an unlimited number
31rem of arguments (up to the command line limit, anyway).
32set ANT_CMD_LINE_ARGS=%1
33if ""%1""=="""" goto doneStart
34shift
35:setupArgs
36if ""%1""=="""" goto doneStart
37if ""%1""==""-noclasspath"" goto clearclasspath
38set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
39shift
40goto setupArgs
41
42rem here is there is a -noclasspath in the options
43:clearclasspath
44set _USE_CLASSPATH=no
45shift
46goto setupArgs
47
48rem This label provides a place for the argument list loop to break out
49rem and for NT handling to skip to.
50
51:doneStart
52rem find ANT_HOME if it does not exist due to either an invalid value passed
53rem by the user or the %0 problem on Windows 9x
54if exist "%ANT_HOME%\lib\ant.jar" goto checkJava
55
56rem check for ant in Program Files
57if not exist "%ProgramFiles%\ant" goto checkSystemDrive
58set ANT_HOME=%ProgramFiles%\ant
59goto checkJava
60
61:checkSystemDrive
62rem check for ant in root directory of system drive
63if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive
64set ANT_HOME=%SystemDrive%\ant
65goto checkJava
66
67:checkCDrive
68rem check for ant in C:\ant for Win9X users
69if not exist C:\ant\lib\ant.jar goto noAntHome
70set ANT_HOME=C:\ant
71goto checkJava
72
73:noAntHome
74echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
75goto end
76
77:checkJava
78set _JAVACMD=%JAVACMD%
79
80if "%JAVA_HOME%" == "" goto noJavaHome
81if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
82if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
83goto checkJikes
84
85:noJavaHome
86if "%_JAVACMD%" == "" set _JAVACMD=java.exe
87
88:checkJikes
89if not "%JIKESPATH%"=="" goto runAntWithJikes
90
91:runAnt
92if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
93if not "%CLASSPATH%"=="" goto runAntWithClasspath
94"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
95goto end
96
97:runAntNoClasspath
98"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
99goto end
100
101:runAntWithClasspath
102"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
103goto end
104
105:runAntWithJikes
106if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
107if not "%CLASSPATH%"=="" goto runAntWithJikesAndClasspath
108
109:runAntWithJikesNoClasspath
110"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
111goto end
112
113:runAntWithJikesAndClasspath
114"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
115goto end
116
117:end
118set _JAVACMD=
119set ANT_CMD_LINE_ARGS=
120
121if "%OS%"=="Windows_NT" @endlocal
122if "%OS%"=="WINNT" @endlocal
123
124:mainEnd
125if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
126
Note: See TracBrowser for help on using the browser.