echo off

call %~dp0..\..\bin\init.bat

set DEV_DIR=..\..\..\dev

echo ****************************************************
echo * Ant Target is
echo *  compile(default) : compile java files
echo *  jar 仸           : compile + create Jar files
echo *  taglib           : create taglib xml files
echo *  spec             : create Javadoc Spec sheet
echo *  check            : RELEASE-NOTES check
echo *  all 仸           : compile 乣 check All running
echo *
echo *  javadoc          : javadoc , zip
echo *
echo * Web is used.
echo *  xml              : create Data XML files
echo *  table            : create Table/Index XML files
echo *  dbload           : insert Database in db/common/xml/taglib XML files
echo *
echo ****************************************************

set /p target=Type Target:

set ANT_VER=ant1.9.6
set ANT_HOME=%DEV_DIR%\%ANT_VER%
set PATH=%PATH%;%ANT_HOME%\bin;

rem log僼傽僀儖偺僋儕傾
echo > log1.txt 2> log2.txt

if "%target%"=="all" (
	set CHECK_FLAG=0
	for %%A in (compile jar taglib spec check) do (
		echo %%A
		call ant %%A >> log1.txt 2>> log2.txt
	)
) else if "%target%"=="jar" (
	set CHECK_FLAG=0
	for %%A in (compile jar) do (
		echo %%A
		call ant %%A >> log1.txt 2>> log2.txt
	)
) else (
	set CHECK_FLAG=1
	call ant %target% > log1.txt 2> log2.txt
)
