You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

bootstrap.bat 2.7 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. @echo off
  2. REM You will need to specify JAVA_HOME if compiling with 1.2 or later.
  3. set OLDJAVA=%JAVA%
  4. set OLDJAVAC=%JAVAC%
  5. set BOOTOLDCLASSPATH=%CLASSPATH%
  6. set OLDANTHOME=%ANT_HOME%
  7. set ANT_HOME=.
  8. if "" == "%JAVA%" if "" == "%JAVA_HOME%" set JAVA=java
  9. if "" == "%JAVA%" set JAVA=%JAVA_HOME%\bin\java
  10. if "" == "%JAVAC%" if "" == "%JAVA_HOME%" set JAVAC=javac
  11. if "" == "%JAVAC%" set JAVAC=%JAVA_HOME%\bin\javac
  12. echo.
  13. echo ... Bootstrapping Ant Distribution
  14. if "%OS%" == "Windows_NT" if exist bootstrap\nul rmdir/s/q bootstrap
  15. if not "%OS%" == "Windows_NT" if exist bootstrap\nul deltree/y bootstrap
  16. if "%OS%" == "Windows_NT" if exist build\classes\nul rmdir/s/q build\classes
  17. if not "%OS%" == "Windows_NT" if exist build\classes\nul deltree/y build\classes
  18. SET LOCALCLASSPATH=lib\crimson.jar;lib\jaxp.jar;
  19. for %%i in (lib\optional\*.jar) do call src\script\lcp.bat %%i
  20. if exist "%JAVA_HOME%\lib\tools.jar" call src\script\lcp.bat %JAVA_HOME%\lib\tools.jar
  21. if exist "%JAVA_HOME%\lib\classes.zip" call src\script\lcp.bat %JAVA_HOME%\lib\classes.zip
  22. set TOOLS=src\main\org\apache\tools
  23. set CLASSDIR=build\classes
  24. SET CLASSPATH=%LOCALCLASSPATH%;%CLASSDIR%;src\main;%CLASSPATH%
  25. echo JAVA_HOME=%JAVA_HOME%
  26. echo JAVA=%JAVA%
  27. echo JAVAC=%JAVAC%
  28. echo CLASSPATH=%CLASSPATH%
  29. if "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul rmdir/s/q %CLASSDIR%
  30. if not "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul deltree/y %CLASSDIR%
  31. if not exist build\nul mkdir build
  32. if not exist build\classes\nul mkdir build\classes
  33. echo.
  34. echo ... Compiling Ant Classes
  35. "%JAVAC%" -d %CLASSDIR% %TOOLS%\tar\*.java %TOOLS%\zip\*.java %TOOLS%\ant\*.java %TOOLS%\ant\types\*.java %TOOLS%\ant\taskdefs\*.java %TOOLS%\ant\util\*.java %TOOLS%\ant\util\regexp\RegexpMatcher.java %TOOLS%\ant\util\regexp\RegexpMatcherFactory.java %TOOLS%\ant\taskdefs\condition\*.java %TOOLS%\ant\taskdefs\compilers\*.java
  36. echo.
  37. echo ... Copying Required Files
  38. copy %TOOLS%\ant\taskdefs\*.properties %CLASSDIR%\org\apache\tools\ant\taskdefs
  39. copy %TOOLS%\ant\types\*.properties %CLASSDIR%\org\apache\tools\ant\types
  40. echo.
  41. echo ... Building Ant Distribution
  42. "%JAVA%" %ANT_OPTS% org.apache.tools.ant.Main -emacs bootstrap
  43. echo.
  44. echo ... Cleaning Up Build Directories
  45. if "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul rmdir/s/q %CLASSDIR%
  46. if not "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul deltree/y %CLASSDIR%
  47. echo.
  48. echo ... Done Bootstrapping Ant Distribution
  49. set JAVA=%OLDJAVA%
  50. set JAVAC=%OLDJAVAC%
  51. set CLASSPATH=%BOOTOLDCLASSPATH%
  52. set ANT_HOME=%OLDANTHOME%
  53. set OLDJAVA=
  54. set OLDJAVAC=
  55. set BOOTOLDCLASSPATH=
  56. set LOCALCLASSPATH=
  57. set OLDANTHOME=
  58. set TOOLS=