@echo off
if ""=="%1" goto :usage

setlocal

SET ANT_HOME=..\tools\ant-1.6.2
if ""=="%JAVA_HOME%" SET JAVA_HOME=..\tools\jdk-1.5.0

call %ANT_HOME%\bin\ant -Dout.dir=%1 %2

goto :done

:usage

echo Build script
echo.
echo Usage: 
echo     %0 output_folder [target]
echo.
echo Example: build source files
echo     %0 "c:\temp"
echo.
echo Example: create API documentation
echo     %0 "c:\temp" doc
echo.

:done