@echo off
REM The first lines arrange some environment variable in respect to ANT and XSLT. Please correct this pathes.
REM You have to download ANT from www.ant.apache.org or use inside an ECLIPSE installation www.eclipse.org.

SET ANT_HOME=d:\Programme\Eclipse3_3\plugins\org.apache.ant_1.7.0.v200706080842

REM The SAXON xsl translater is used inside Zmake. You must Download it from www.saxonica.com.
SET CLASSPATH_SAXON=/Programme/XML_Tools/saxon9.jar

REM The ZBNFJAX_HOME environment variable is used inside Zmake. It contains the path to toolfiles. In this example it is the actual dir.
set ZBNFJAX_HOME=../../zbnfjax

REM Set the input, it is used as argument of next call and for the name of the ant.xml-file:
set INPUT=zmake_test_zbnfjax.bat

REM calling Zmake. It produces the ant.xml script.
java -cp ../../zbnfjax/zbnf.jar;%CLASSPATH_SAXON% org.vishia.zbnf.Zmake %INPUT% -tmp=tmp -zbnf4ant=xsl/ZmakeStd.zbnf -xslt4ant=xsl/ZmakeStd.xslp --report:tmp/zmake_test.rpt
if errorlevel 1 goto :error

REM calling ANT to execute the script. Without special argument it is 'ant_%INPUT%.xml'.
REM On Execution ANT the CLASSPATH to zmakeAnt.jar should know because org/vishia/ant/Zcopy. 
REM ANT uses the CLASSPATH evironment variable.
set CLASSPATH=../../zbnfjax/zmakeAnt.jar;%CLASSPATH%
call %ANT_HOME%\bin\ant -f tmp/ant_%INPUT%.xml -DcurDir=%CD%
if errorlevel 1 goto :error
goto :ende

:error
  pause
  exit /B 1
:ende
