@echo off

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=OSAL_make.zmake

REM calling Zmake. It produces the ant.xml script.
java -cp ../../zbnfjax/zbnf.jar org.vishia.zmake.Zmake %INPUT% -o=test.bat -tmp=tmp -zbnf=xsl/ZmakeStd.zbnf -genCtrl=./compile1.zmakegen  --report:tmp/zmake_test.rpt
if errorlevel 1 goto :error

REM calling the generated bat-file to execute the script. 

if errorlevel 1 goto :error
goto :ende

:error
  pause
  exit /B 1
:ende
pause