echo off

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

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

echo ****************************************************
echo * Ant Target is
echo *  compile(default) : compile java files
echo *  jar              : 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 *  war              : create War files
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=apache-ant-1.9.7
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 (
	set CHECK_FLAG=1
	call ant %target% > log1.txt 2> log2.txt
)
