git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194532 13f79535-47bb-0310-9956-ffa450edef68pull/30/head
<?xml version="1.0"?> | |||||
<!-- =========================================================================== | |||||
Build targets | |||||
============= | |||||
These are the meaningful targets for this build file: | |||||
- pdf [default] -> creates ./fop.pdf | |||||
- clean -> deletes all files produced by this script | |||||
--> | |||||
<project default="pdf" basedir="."> | |||||
<!-- =================================================================== --> | |||||
<!-- Initialization target --> | |||||
<!-- =================================================================== --> | |||||
<target name="init"> | |||||
<tstamp/> | |||||
<property name="src.dir" value="./fop"/> | |||||
<property name="allfiles.xml" value="fop-doc.xml"/> | |||||
<property name="outfile.fo" value="fop.fo"/> | |||||
<property name="outfile.pdf" value="fop.pdf"/> | |||||
<taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop"/> | |||||
<taskdef name="xslt" classname="org.apache.fop.tools.anttasks.Xslt"/> | |||||
</target> | |||||
<!-- =================================================================== --> | |||||
<!-- copies all xml files into one. the infile is a dummy, because the --> | |||||
<!-- source files are defined in the stylesheet --> | |||||
<!-- =================================================================== --> | |||||
<target name="prepare-files" depends="init"> | |||||
<xslt infile="fop.xml" xsltfile="xml2xml.xsl" outfile="${allfiles.xml}" smart="yes"/> | |||||
</target> | |||||
<!-- =================================================================== --> | |||||
<!-- Generates the fo file --> | |||||
<!-- =================================================================== --> | |||||
<target name="fo" depends="prepare-files"> | |||||
<xslt infile="${allfiles.xml}" xsltfile="xml2pdf.xsl" outfile="${outfile.fo}" smart="yes"/> | |||||
</target> | |||||
<!-- =================================================================== --> | |||||
<!-- Generates the pdf file --> | |||||
<!-- =================================================================== --> | |||||
<target name="pdf" depends="fo"> | |||||
<fop fofile="${outfile.fo}" outfile="${outfile.pdf}"/> | |||||
</target> | |||||
<!-- =================================================================== --> | |||||
<!-- Clean targets --> | |||||
<!-- =================================================================== --> | |||||
<target name="clean"> | |||||
<delete file="${allfiles.xml}"/> | |||||
<delete file="${outfile.fo}"/> | |||||
<delete file="${outfile.pdf}"/> | |||||
</target> | |||||
</project> | |||||
<!-- End of file --> |
@echo off | |||||
REM creates pdf and html documentation | |||||
echo Building Fop documentation (pdf,html) | |||||
echo ---------------- | |||||
if "%JAVA_HOME%" == "" goto error | |||||
set LIBDIR=..\..\lib | |||||
set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\classes.zip;%LIBDIR%\ant.jar;%LIBDIR%\batik.jar;%LIBDIR%\buildtools.jar;%LIBDIR%\xerces-1.2.3.jar;%LIBDIR%\xalan-1.2.2.jar;%LIBDIR%\bsf.jar;%LIBDIR%\avalon-framework-4.0.jar;%LIBDIR%\logkit-1.0b4.jar;%LIBDIR%\jimi-1.0.jar;%LIBDIR%\stylebook.jar;%LIBDIR%\..\build\fop.jar | |||||
set ANT_HOME=%LIBDIR% | |||||
%JAVA_HOME%\bin\java.exe -Dant.home=%ANT_HOME% -classpath %LOCALCLASSPATH%;%CLASSPATH% org.apache.tools.ant.Main %1 %2 %3 %4 %5 | |||||
%JAVA_HOME%\bin\java.exe -classpath %LOCALCLASSPATH%;%CLASSPATH% org.apache.stylebook.StyleBook "targetDirectory=../html-docs/" fop.xml style/ | |||||
goto end | |||||
:error | |||||
echo ERROR: JAVA_HOME not found in your environment. | |||||
echo Please, set the JAVA_HOME variable in your environment to match the | |||||
echo location of the Java Virtual Machine you want to use. | |||||
:end | |||||
#!/bin/sh | |||||
#This file should be executable | |||||
echo | |||||
echo "Converting Fop's xml documentation into a pdf file, creating html docs" | |||||
echo "----------------" | |||||
echo | |||||
if [ "$JAVA_HOME" = "" ] ; then | |||||
echo "ERROR: JAVA_HOME not found in your environment." | |||||
echo | |||||
echo "Please, set the JAVA_HOME variable in your environment to match the" | |||||
echo "location of the Java Virtual Machine you want to use." | |||||
exit 1 | |||||
fi | |||||
LIBDIR=../../lib | |||||
LOCALCLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/classes.zip:$LIBDIR/ant.jar:$LIBDIR/batik.jar:$LIBDIR/buildtools.jar:$LIBDIR/xerces-1.4.3.jar:$LIBDIR/xalan-2.2D11.jar:$LIBDIR/logkit-1.0.jar:$LIBDIR/jimi-1.0.jar:$LIBDIR/stylebook.jar:$LIBDIR/../build/fop.jar | |||||
ANT_HOME=$LIBDIR | |||||
echo Building with classpath $LOCALCLASSPATH:$CLASSPATH | |||||
echo | |||||
echo Starting Ant... | |||||
echo | |||||
$JAVA_HOME/bin/java -Dant.home=$ANT_HOME -classpath "$LOCALCLASSPATH:$CLASSPATH" org.apache.tools.ant.Main $* | |||||
$JAVA_HOME/bin/java -classpath "$LOCALCLASSPATH:$CLASSPATH" org.apache.stylebook.StyleBook "targetDirectory=../html-docs/" fop.xml skins/xml.apache.org/ |