echo off

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

echo ****************************************************
echo * Ant Target is
echo *  compile(default) : compile java files
echo *  jar              : create Jar files
echo *  javadoc          : create Javadoc files
echo *  spec             : create Javadoc Spec sheet
echo *  all              : compile 〜 spec All create
echo *
echo *  xml              : create Data XML files
echo *  table            : create Table/Index XML files
echo *
echo *  build            : create build files
echo *  apps             : make apps archive(difference only)
echo *
echo *  copy1(mis-dev2)  : copy jar files to opengionV6 [bb,bc,ge,gj,sc,ul]
echo *  copy2(local)     : copy jar files to opengionMICS [ge,mics,ryuo]
echo ****************************************************

set /p target=Type Target.

rem ant1.9.3 は、NullPointerException のバグがある為、とりあえず 1.9.2 を使用
set ANT_VER=ant1.9.2
set ANT_HOME=c:\developV6\%ANT_VER%
set PATH=%PATH%;%ANT_HOME%\bin;

if "%target%"=="all" (
	echo > log1.txt 2> log2.txt
	for %%A in (compile jar javadoc spec) do (
		echo %%A
		call ant %%A >> log1.txt 2>> log2.txt
	)
) else (
	call ant %target% > log1.txt 2> log2.txt
)
