echo off
REM generating a jar file which contains Teh vishia-XSLT-component 
REM Note that the srcJava_vishiaBase component should be present in the correct version in parallel path of this component. 

REM The TMP_JAVAC is a directory, which contains only this compiling results. It will be clean in the batch processing.
if "%TMP_JAVAC%" == "" set TMP_JAVAC=..\..\..\tmp_javac

REM Output dir and jar-file with path and filename relative from current dir:
REM The output dir is exe usually but zbnfjax if this file is compiled in the ZBNF download preparation.
set OUTDIR_JAVAC=..\..\exe
REM regard environment zbnfjax:
if exist ..\..\zbnfjax set OUTDIR_JAVAC=..\..\zbnfjax
set JAR_JAVAC=Xslt.jar


REM Manifest-file for jar building relativ path from current dir:
set MANIFEST_JAVAC=Xslt.manifest

REM Input for javac, only choice of primary sources, relativ path from current (make)-directory:
REM Note: The org.vishia.xml.Xslt is placed in srcJava_vishiaBase because it does not depends on any other library.
REM But it is compiled into this jar file. The proper secondary jar file is zbnf.jar, which contains some other parts of srcJava_vishiaBase.
set INPUT_JAVAC=
::set INPUT_JAVAC=%INPUT_JAVAC% ../../srcJava_vishiaBase/org/vishia/xml/*.java
set INPUT_JAVAC=%INPUT_JAVAC% ../org/vishia/xml/*.java
set INPUT_JAVAC=%INPUT_JAVAC% ../org/vishia/xml/docuGen/*.java
::set INPUT_JAVAC=%INPUT_JAVAC% ../../srcJava_vishiaBase/org/vishia/xml/Textfile2Html.java
::set INPUT_JAVAC=%INPUT_JAVAC% ../../srcJava_vishiaBase/org/vishia/xmlSimple/Xsltpre.java

set JAVACP_Zbnf=%OUTDIR_JAVAC%/zbnf.jar

REM search JDOM ans Saxon in filesystem:
REM first try location of XML_TOOLS
if exist D:\Progs\XML_Tools set XML_TOOLS=D:\Progs\XML_Tools
if exist D:\Programs\XML_Tools set XML_TOOLS=D:\Programs\XML_Tools
if exist D:\Programme\XML_Tools set XML_TOOLS=D:\Programme\XML_Tools

set JAVACP_Jdom=
if exist %XML_TOOLS%\jdom.jar set JAVACP_Jdom=%XML_TOOLS%\jdom.jar

set JAVACP_Saxon=
if exist %XML_TOOLS%\saxon9.jar set JAVACP_Saxon=%XML_TOOLS%\saxon9.jar;%XML_TOOLS%\saxon9-jdom.jar

REM Sets the CLASSPATH variable for compilation (used jar-libraries). do not leaf empty also it aren't needed:
set CLASSPATH_JAVAC=%JAVACP_Zbnf%;%JAVACP_Jdom%;%JAVACP_Saxon%

REM Sets the src-path for further necessary sources:

set SRCPATH_JAVAC=..;../../srcJava_vishiaBase

call ..\..\srcJava_vishiaBase\_make\+javacjarbase.bat
if exist ..\..\..\ZBNF\sf\ZBNF\zbnfjax copy ..\..\exe\xslt.jar ..\..\..\ZBNF\sf\ZBNF\zbnfjax\xslt.jar
