@echo off

set CLASSES=ApplyXSLT.class ApplyXSLTUtil.class

rem ---- Name and location of java programs ----
set JAVAC="%JAVA_HOME%\bin\javac"
set JAVA="%JAVA_HOME%\bin\java"
set JAR="%JAVA_HOME%\bin\jar"

set JAVACOPTIONS=-deprecation -g -O

if ""%1"" == """" goto all
if ""%1"" == ""all"" goto all
if ""%1"" == ""install"" goto install
if ""%1"" == ""clean"" goto clean

:unknown
	echo Error: Unrecognized argument %1.
	goto done

:all
	echo Compiling ApplyXSLT classes ...
	%JAVAC% %JAVACOPTIONS% -d ..\..\.. -classpath ..\..\.. *.java
	%JAR% cvf ApplyXSLT.jar -C ..\..\..  org\nzdl\gsdl\ApplyXSLT.class -C ..\..\.. org\nzdl\gsdl\ApplyXSLTUtil.class
	goto done

:install
	goto done

:clean
	echo Cleaning up ApplyXSLT ...
        if exist ApplyXSLT.jar del ApplyXSLT.jar
        if exist ApplyXSLT.class del ApplyXSLT.class
        if exist ApplyXSLTUtil.class del ApplyXSLTUtil.class
	goto done 

:done

