123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671 |
- <?xml version="1.0"?>
-
- <!-- ===========================================================================
-
-
- * ================= *
- | How to build Fop |
- * ================= *
-
- Adaption from the Cocoon build.xml written by Stefano Mazzocchi
- by Giacomo Pati with some addition by Fotis Jannidis
-
-
- Introduction
- ============
-
- FOP is the world's first print formatter driven by XSL formatting objects. It
- is a Java 1.1 application that reads a formatting object tree and then turns
- it into a PDF document. The formatting object tree, can be in the form of an
- XML document (output by an XSLT engine like XT or Xalan) or can be passed in
- memory as a DOM Document or (in the case of XT) SAX events.
-
- FOP is part of Apache's XML project. The homepage of FOP is
- http:/xml.apache.org/fop
-
- HTML-Documentation can be found in the subdirectory ./docs.
-
-
- Installing the build tools
- ==========================
-
- The Fop build system is based on Jakarta Ant, which is a Java building tool
- originally developed for the Jakarta Tomcat project but now used in many other
- Apache projects and extended by many developers.
-
- Ant is a little but very handy tool that uses a build file written in XML
- (this file) as building instructions. For more information refer to
- "http://jakarta.apache.org/ant/".
-
- To make things easier for you, the Fop distribution contains a
- precompiled version of Ant and the build scripts take care of all the
- classpath issues except the following:
-
- You need to have xerces.jar, xalan.jar and bsf.jar (comes with xalan) in
- your classpath. You can get those from http://xml.apache.org/xerces and
- http://xml.apache.org/xalan respectively.
-
- Additionaly you have to make sure, that the "JAVA_HOME" environment
- property should be set to match the JVM you want to use. That's it.
-
-
- Building instructions
- =====================
-
- First, make sure your current working directory is where this very file is
- located. Then type
-
- ./build.sh (unix)
- .\build.bat (win32)
-
- if everything is right and all the required packages are visible, this action
- will generate a file called "fop.jar" in the "./build" directory. Note, that
- if you do further development, compilation time is reduced since Ant is able
- to detect which files have changed an to recompile them at need.
-
- If something went wrong, go to the FAQ section below.
-
- Also, you'll note that reusing a single JVM instance for each task, increases
- tremendously the performance of the whole build system, compared to other
- tools (i.e. make or shell scripts) where a new JVM is started for each task.
-
-
-
- Build targets
- =============
-
- The build system is not only responsible of compiling Fop into a jar file,
- but is also responsible for creating the HTML documentation, javadocs,
- distributions and web site. In fact, the file you have here is _exactly_ what
- is used by fop maintainers to take care of everything in the Fop
- project, no less and no more. (only partially implemented)
-
- These are the meaningful targets for this build file:
-
- - package [default] -> creates ./build/fop.jar
- - usage -> shows a help screen
- - codegen -> generates needed java sources from xml resources
- - docs -> generates the HTML documentation in ./build/docs
- - javadocs -> generates the API documentation in ./build/javadocs
- - dist -> generates the Fop distribution
- - clean -> restores the distribution to its original and clean state
- (excepting dist files)
- - distclean -> restores the distribution to its original and clean state
- - site -> generates the web site in ../xml-site/targets/fop (not yet impl.)
-
- ====================================== FAQ =====================================
-
- 1) Why some of the classes present in the original jar are not built anymore?
-
- The fop build system is very flexible: if a module requires a package that
- is not present in the classpath at build time, the module is skipped but
- the built process is not stopped.
-
- Here is a list of such modules and what you have to download to build them:
-
- org.apache.fop.apps.XTCommandLine ===>
- James Clark's XT (http://www.jclark.com/)
-
- 2) I see a lot of warnings starting like this: "Warning: file modified in the future:"
- Sometimes ant gives out this warnings, but the build is finished without any problems
-
-
- ============================================================================ -->
-
- <project default="package" basedir=".">
-
- <fileset dir="${basedir}" id="dist.bin">
- <include name="conf/**"/>
- <include name="docs/**"/>
- <include name="hyph/**"/>
- <include name="CHANGES"/>
- <include name="LICENSE"/>
- <include name="README"/>
- <include name="STATUS"/>
- <include name="fop.bat"/>
- <include name="fop.sh"/>
- <exclude name="src/**"/>
- <exclude name="dist/**"/>
- <exclude name="build/**"/>
- <exclude name="lib/**"/>
- </fileset>
-
- <fileset dir="${basedir}" id="dist.bin.lib">
- <include name="lib/xerces-1.2.3.jar"/>
- <include name="lib/xalan-2.0.0.jar"/>
- <include name="lib/xalanj1compat.jar"/>
- <include name="lib/batik.jar"/>
- <include name="lib/logkit-1.0b4.jar"/>
- <include name="lib/avalon-framework-4.0.jar"/>
- <include name="lib/jimi*"/>
- </fileset>
-
- <fileset dir="${basedir}" id="dist.src">
- <exclude name="lib/classes/**"/>
- <exclude name="lib/org/**"/>
- <exclude name="lib/src/**"/>
- <exclude name="build/**"/>
- <include name="src/**"/>
- <include name="conf/**"/>
- <include name="docs/**"/>
- <include name="hyph/**"/>
- <include name="lib/**"/>
- <include name="CHANGES"/>
- <include name="LICENSE"/>
- <include name="README"/>
- <include name="STATUS"/>
- <include name="build*"/>
- <include name="fop.bat"/>
- <include name="fop.sh"/>
- </fileset>
-
- <!-- =================================================================== -->
- <!-- Initialization target -->
- <!-- =================================================================== -->
- <target name="init" depends="init-avail, init-filters-xalan1, init-filters-xalan2">
- <tstamp/>
- <property name="Name" value="Fop"/>
- <property name="name" value="fop"/>
- <property name="version" value="0.20.1"/>
- <filter token="version" value="${version}"/>
- <property name="year" value="1999-2001"/>
-
- <echo message="------------------- ${Name} ${version} [${year}] ----------------"/>
-
- <property name="build.compiler" value="classic"/>
- <property name="debug" value="off"/>
- <property name="optimize" value="on"/>
- <property name="deprecation" value="off"/>
-
- <property name="src.dir" value="./src"/>
- <property name="src.codegen" value="./src/codegen"/>
- <property name="docs.dir" value="./docs"/>
- <property name="lib.dir" value="./lib"/>
- <property name="hyph.dir" value="./hyph"/>
- <property name="conf.dir" value="./conf"/>
- <property name="packages" value="org.apache.fop.*"/>
-
- <property name="doc.generator" value="org.apache.stylebook.StyleBook"/>
- <property name="doc.generator.package" value="${lib.dir}/stylebook-1.0-b2.jar"/>
-
- <property name="viewer.resources.src.dir" value="./src/org/apache/fop/viewer/resources"/>
- <property name="viewer.images.src.dir" value="./src/org/apache/fop/viewer/Images"/>
-
- <property name="build.dir" value="./build"/>
- <property name="build.src" value="./build/src"/>
- <property name="build.codegen" value="./build/src/codegen"/>
- <property name="build.dest" value="./build/classes"/>
- <property name="build.docs" value="./build/docs"/>
- <property name="build.javadocs" value="./build/javadocs"/>
-
- <property name="viewer.resources.dest.dir" value="${build.dest}/org/apache/fop/viewer/resources"/>
- <property name="viewer.images.dest.dir" value="${build.dest}/org/apache/fop/viewer/Images"/>
-
- <!-- <property name="dist.dir" value="./dist"/> -->
- <property name="dist.bin.dir" value="./dist-bin"/>
- <property name="dist.src.dir" value="./dist-src"/>
- <property name="dist.bin.result.dir" value="${dist.bin.dir}/${Name}-${version}"/>
- <property name="dist.src.result.dir" value="${dist.src.dir}/${Name}-${version}"/>
-
- <property name="properties.dir" value="org/apache/fop/fo/properties"/>
- <property name="fonts.dir" value="org/apache/fop/render/pdf/fonts"/>
- <property name="svg.dir" value="org/apache/fop/svg"/>
- <property name="replacestring" value="org/apache/fop"/>
- <property name="ignore_this" value="ignore_this.java"/>
- <property name="jimi" value="JimiImage.java"/>
- <property name="jai" value="JAIImage.java"/>
-
- <property name="ignore_jdk11"
- value="org/apache/fop/render/awt/**
- ,org/apache/fop/viewer/**
- ,**/GifJpegImage.java
- ,**/JimiImage.java
- ,**/PrintStarter.java
- ,**/AWTStarter.java"/>
-
- <property name="xslt" value="org.apache.xalan.xslt.Process"/>
- <property name="src.properties.xsl" value="${src.codegen}/properties.xsl"/>
- <property name="src.propmaker.xsl" value="${src.codegen}/propmaker.xsl"/>
- <property name="foproperties.xml" value="${build.codegen}/foproperties.xml"/>
- <property name="colorkw.xml" value="${build.codegen}/colorkw.xml"/>
- <property name="extproperties.xml" value="${build.codegen}/extproperties.xml"/>
- <property name="allprops.xml" value="${build.codegen}/allprops.xml"/>
-
- <property name="properties.xsl" value="${build.codegen}/properties.xsl"/>
- <property name="propmap.xsl" value="${build.codegen}/propmap.xsl"/>
- <property name="enumgen.xsl" value="${build.codegen}/enumgen.xsl"/>
- <property name="propinc.xsl" value="${build.codegen}/propinc.xsl"/>
- <property name="genconst.xsl" value="${build.codegen}/genconst.xsl"/>
- <property name="src.charlist.xsl" value="${src.codegen}/code-point-mapping.xsl"/>
- <property name="charlist.xml" value="${build.codegen}/charlist.xml"/>
- <property name="charlist.xsl" value="${build.codegen}/code-point-mapping.xsl"/>
- <property name="fontfile.xsl" value="${build.codegen}/font-file.xsl"/>
- <property name="t1fontfile.xsl" value="${build.codegen}/t1font-file.xsl"/>
- <property name="ttffontfile.xsl" value="${build.codegen}/ttffontfile.xsl"/>
- <property name="Courier.xml" value="${build.codegen}/Courier.xml"/>
- <property name="Courier-Oblique.xml" value="${build.codegen}/Courier-Oblique.xml"/>
- <property name="Courier-Bold.xml" value="${build.codegen}/Courier-Bold.xml"/>
- <property name="Courier-BoldOblique.xml" value="${build.codegen}/Courier-BoldOblique.xml"/>
- <property name="Helvetica.xml" value="${build.codegen}/Helvetica.xml"/>
- <property name="Helvetica-Oblique.xml" value="${build.codegen}/Helvetica-Oblique.xml"/>
- <property name="Helvetica-Bold.xml" value="${build.codegen}/Helvetica-Bold.xml"/>
- <property name="Helvetica-BoldOblique.xml" value="${build.codegen}/Helvetica-BoldOblique.xml"/>
- <property name="Times-Roman.xml" value="${build.codegen}/Times-Roman.xml"/>
- <property name="Times-Italic.xml" value="${build.codegen}/Times-Italic.xml"/>
- <property name="Times-Bold.xml" value="${build.codegen}/Times-Bold.xml"/>
- <property name="Times-BoldItalic.xml" value="${build.codegen}/Times-BoldItalic.xml"/>
- <property name="ZapfDingbats.xml" value="${build.codegen}/ZapfDingbats.xml"/>
- <property name="Symbol.xml" value="${build.codegen}/Symbol.xml"/>
-
- <property name="xalan1" value="Xalan1Transform.java"/>
- <property name="trax" value="TraxTransform.java"/>
- <property name="xsltransform" value="XSLTransform.java"/>
-
- <property name="tools.pkg" value="org/apache/fop/tools"/>
-
-
- <!-- insert custom font information here (step 1 of 2) -->
- <!-- use this as a template
- <property name="myfont.xml" value="${build.codegen}/myfont.xml"/>
- -->
-
- <taskdef name="serHyph" classname="org.apache.fop.tools.anttasks.SerializeHyphPattern"/>
- <taskdef name="xslt" classname="org.apache.fop.tools.anttasks.Xslt"/>
- <taskdef name="manifest" classname="org.apache.fop.tools.anttasks.Manifest"/>
- <taskdef name="runTest" classname="org.apache.fop.tools.anttasks.RunTest"/>
-
- <property name="main.class" value="org.apache.fop.apps.Fop"/>
- <property name="runtime.classpath" value="lib/xerces-1.2.3.jar lib/xalan-2.0.0.jar lib/xalanj1compat.jar lib/batik.jar lib/jimi-1.0.jar lib/logkit-1.0b4.jar lib/avalon-framework-4.0.jar"/>
-
- <filter filtersfile="${build.src}/codegen/filter"/>
-
- </target>
-
- <target name="init-avail">
- <available property="xt.present" classname="com.jclark.xsl.sax.XSLProcessor"/>
- <available property="jimi.present" classname="com.sun.jimi.core.Jimi"/>
- <available property="jai.present" classname="javax.media.jai.JAI"/>
-
- <available property="trax.present" classname="javax.xml.transform.Transformer"/>
- <available property="xalan1.present" classname="org.apache.xalan.xslt.XSLTProcessor"/>
- <filter token="xalan1-replacestring" value="./build/src/org/apache/fop"/>
- <filter token="xalan2-replacestring" value="../org/apache/fop"/>
-
- </target>
-
- <target name="init-filters-xalan1" depends="init-avail" if="xalan1.present" unless="trax.present">
- <copy file="src/codegen/xalan1.filter" toFile="./build/src/codegen/filter" filtering="on"/>
- </target>
-
- <target name="init-filters-xalan2" depends="init-avail" if="trax.present">
- <copy file="src/codegen/xalan2.filter" toFile="./build/src/codegen/filter" filtering="on"/>
- </target>
-
-
- <!-- =================================================================== -->
- <!-- Help on usage -->
- <!-- =================================================================== -->
- <target name="usage">
- <echo message=""/>
- <echo message=""/>
- <echo message="${Name} Build file"/>
- <echo message="-------------------------------------------------------------"/>
- <echo message=""/>
- <echo message=" available targets are:"/>
- <echo message=""/>
- <echo message=" package --> generates the ${name}.jar file (default)"/>
- <echo message=" codegen --> generates the java files from the xml resources"/>
- <echo message=" compile --> compiles the source code"/>
- <echo message=" docs --> generates the HTML documentation"/>
- <echo message=" javadocs --> generates the API documentation (java 1.2 only)"/>
- <echo message=" dist --> generates the ${Name} distribution as .tar.gz and .zip"/>
- <echo message=" clean --> cleans up the directory (except for the dist files)"/>
- <echo message=" distclean --> cleans up the directory"/>
- <echo message=" site --> generates the ${Name} web site (not yet implemented)"/>
- <echo message=""/>
- <echo message=" See the comments inside the build.xml file for more details."/>
- <echo message="-------------------------------------------------------------"/>
- <echo message=""/>
- <echo message=""/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Prepares the build directory -->
- <!-- =================================================================== -->
- <target name="prepare" depends="init">
- <!-- create directories -->
- <echo message="Preparing the build directories"/>
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${build.src}"/>
- <mkdir dir="${build.src}/${properties.dir}"/>
- <mkdir dir="${build.src}/${fonts.dir}"/>
- <mkdir dir="${build.src}/${svg.dir}"/>
- <mkdir dir="${build.dest}/conf"/>
- <mkdir dir="${build.dest}/hyph"/>
- <copy todir="${build.dest}/conf" filtering="yes">
- <fileset dir="./conf"/>
- </copy>
- </target>
-
-
- <!-- =================================================================== -->
- <!-- compiles hyphenation patterns -->
- <!-- =================================================================== -->
-
- <target name="hyphenation" depends="prepare" >
- <serHyph includes="*.xml"
- sourceDir="./hyph"
- targetDir="${build.dest}/hyph" />
- </target>
-
-
- <!-- =================================================================== -->
- <!-- copies some source files if xt is present -->
- <!-- =================================================================== -->
- <target name="prepare-xt" depends="prepare" if="xt.present">
- <copy todir="${build.src}">
- <fileset dir="${src.dir}" includes="**/XT*,**/PDFOutputHandler.java"/>
- </copy>
- </target>
-
- <!-- =================================================================== -->
- <!-- copies special image class only if Jimi library is present -->
- <!-- =================================================================== -->
- <target name="prepare-jimi" depends="prepare" if="jimi.present">
- <echo message="Jimi library is present. Fop installs jimi support."/>
- <copy todir="${build.src}">
- <fileset dir="${src.dir}" includes="**/${jimi}"/>
- </copy>
- </target>
-
- <!-- =================================================================== -->
- <!-- copies special image class only if JAI library is present -->
- <!-- =================================================================== -->
- <target name="prepare-jai" depends="prepare" if="jai.present">
- <echo message="JAI library is present. Fop installs JAI support."/>
- <copy todir="${build.src}">
- <fileset dir="${src.dir}" includes="**/${jai}"/>
- </copy>
- </target>
-
-
- <target name="prepare-xalan1" if="xalan1.present">
- <echo message="Xalan1 is present. Installing Xalan1 support"/>
- <copy todir="${build.src}">
- <fileset dir="${src.dir}" includes="**/${xsltransform},**/${xalan1}"/>
- </copy>
- </target>
-
- <target name="prepare-trax" if="trax.present">
- <echo message="JAXP1.1 transforms is present. Installing TRaX support"/>
- <copy todir="${build.src}">
- <fileset dir="${src.dir}" includes="**/${xsltransform},**/${trax},**/apps/TraxInputHandler.java"/>
- </copy>
- </target>
-
-
- <!-- =================================================================== -->
- <!-- Prepares the source code -->
- <!-- =================================================================== -->
- <target name="prepare-src" depends="prepare, prepare-xt, prepare-jimi, prepare-jai, prepare-xalan1, prepare-trax">
- <!-- copy src files -->
- <copy todir="${build.src}">
- <fileset dir="${src.dir}"
- excludes="**/Makefile*, **/package.html, **/XT*,**/PDFOutputHandler.java,**/${jimi},**/${jai},**/${xsltransform},**/${trax},**/${xalan1},**/apps/TraxInputHandler.java"/>
- </copy>
- </target>
-
- <!-- =================================================================== -->
- <!-- Generate the source code -->
- <!-- =================================================================== -->
- <target name="codegen" depends="prepare">
- <!-- resetting codegen directory -->
- <echo message="Resetting codegen directory"/>
-
- <!-- copy codegen directory -->
- <copy todir="${build.codegen}" filtering="on">
- <fileset dir="${src.codegen}"/>
- </copy>
-
- <!-- generate the java files from xml resources -->
- <echo message="Generating the java files from xml resources"/>
- <xslt infile="${allprops.xml}" xsltfile="${genconst.xsl}"
- dependent="${foproperties.xml},${extproperties.xml},${colorkw.xml}"
- outfile="${build.src}/${replacestring}/fo/properties/Constants.java" smart="yes"/>
-
- <xslt infile="${foproperties.xml}" xsltfile="${properties.xsl}"
- dependent="${propinc.xsl},${colorkw.xml}"
- outfile="${build.src}/${replacestring}/fo/properties/fo_${ignore_this}" smart="yes"/>
- <xslt infile="${foproperties.xml}" xsltfile="${propmap.xsl}"
- dependent="${propinc.xsl}"
- outfile="${build.src}/${replacestring}/fo/properties/FOPropertyMapping.java" smart="yes"/>
- <xslt infile="${foproperties.xml}" xsltfile="${enumgen.xsl}"
- dependent="${propinc.xsl}"
- outfile="${build.src}/${replacestring}/fo/properties/foenums_${ignore_this}" smart="yes"/>
-
- <xslt infile="${extproperties.xml}" xsltfile="${properties.xsl}"
- dependent="${propinc.xsl}"
- outfile="${build.src}/${replacestring}/fo/properties/ext_${ignore_this}" smart="yes"/>
- <xslt infile="${extproperties.xml}" xsltfile="${propmap.xsl}"
- dependent="${propinc.xsl}"
- outfile="${build.src}/${replacestring}/fo/properties/ExtensionPropertyMapping.java" smart="yes"/>
- <xslt infile="${extproperties.xml}" xsltfile="${enumgen.xsl}"
- dependent="${propinc.xsl}"
- outfile="${build.src}/${replacestring}/fo/properties/extenums_${ignore_this}" smart="yes"/>
-
- <xslt infile="${charlist.xml}" xsltfile="${charlist.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/CodePointMapping.java" smart="yes"/>
- <xslt infile="${Courier.xml}" xsltfile="${fontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/Courier.java" smart="yes"/>
- <xslt infile="${Courier-Oblique.xml}" xsltfile="${fontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/CourierOblique.java" smart="yes"/>
- <xslt infile="${Courier-Bold.xml}" xsltfile="${fontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/CourierBold.java" smart="yes"/>
- <xslt infile="${Courier-BoldOblique.xml}" xsltfile="${fontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/CourierBoldOblique.java" smart="yes"/>
- <xslt infile="${Helvetica.xml}" xsltfile="${fontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/Helvetica.java" smart="yes"/>
- <xslt infile="${Helvetica-Oblique.xml}" xsltfile="${fontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/HelveticaOblique.java" smart="yes"/>
- <xslt infile="${Helvetica-Bold.xml}" xsltfile="${fontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/HelveticaBold.java" smart="yes"/>
- <xslt infile="${Helvetica-BoldOblique.xml}" xsltfile="${fontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/HelveticaBoldOblique.java" smart="yes"/>
- <xslt infile="${Times-Roman.xml}" xsltfile="${fontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/TimesRoman.java" smart="yes"/>
- <xslt infile="${Times-Italic.xml}" xsltfile="${fontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/TimesItalic.java" smart="yes"/>
- <xslt infile="${Times-Bold.xml}" xsltfile="${fontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/TimesBold.java" smart="yes"/>
- <xslt infile="${Times-BoldItalic.xml}" xsltfile="${fontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/TimesBoldItalic.java" smart="yes"/>
- <xslt infile="${ZapfDingbats.xml}" xsltfile="${fontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/ZapfDingbats.java" smart="yes"/>
- <xslt infile="${Symbol.xml}" xsltfile="${fontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/Symbol.java" smart="yes"/>
-
- <!-- custom fonts (Use t1fontfile.xsl instead of fontfile.xsl for Type 1 fonts!) step 2/2 -->
- <!-- use this as a template for type 1 fonts:
- <xslt infile="${myfont.xml}" xsltfile="${t1fontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/myfont.java" smart="yes"/>
- -->
- <!-- use this as a template for truetype fonts
- <xslt infile="${myfont.xml}" xsltfile="${ttffontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/myfont.java" smart="yes"/>
- -->
-
-
- </target>
-
- <!-- =================================================================== -->
- <!-- Compiles the source directory -->
- <!-- =================================================================== -->
- <target name="compile" depends="codegen, prepare-src">
- <echo message="Compiling the sources "/>
- <!-- create directories -->
- <mkdir dir="${build.dest}"/>
-
- <mkdir dir="${viewer.resources.dest.dir}"/>
- <copy todir="${viewer.resources.dest.dir}">
- <fileset dir="${viewer.resources.src.dir}"/>
- </copy>
- <mkdir dir="${viewer.images.dest.dir}"/>
- <copy todir="${viewer.images.dest.dir}">
- <fileset dir="${viewer.images.src.dir}"/>
- </copy>
-
- <javac srcdir="${build.src}"
- destdir="${build.dest}"
- debug="${debug}"
- deprecation="${deprecation}"
- optimize="${optimize}"
- excludes="**/*${ignore_this},${jimi}"/>
- </target>
-
- <target name="compile-jdk11" depends="codegen, prepare-src">
- <echo message="Compiling the sources for JDK1.1"/>
- <!-- create directories -->
- <mkdir dir="${build.dest}"/>
-
- <javac srcdir="${build.src}"
- destdir="${build.dest}"
- debug="${debug}"
- deprecation="${deprecation}"
- optimize="${optimize}"
- excludes="**/${ignore_this},${Jimi},${ignore_jdk11}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Creates the class package -->
- <!-- =================================================================== -->
- <target name="package" depends="compile,hyphenation">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
- <manifest file="${build.dir}/Manifest.txt" overwrite="yes"
- mainclass="${main.class}"
- classpath="${runtime.classpath}"
- impltitle="${Name}" implversion="${version}"
- implvendor="Apache Software Foundation (http://xml.apache.org/fop/)"/>
- <jar jarfile="${build.dir}/${name}.jar" manifest="${build.dir}/Manifest.txt"
- basedir="${build.dest}"
- includes="org/**,conf/**,hyph/**"/>
- </target>
-
- <target name="test" depends="package">
- <echo message="Testing build in jar file ${build.dir}/${name}.jar against reference"/>
- <runTest testSuite="basictests.xml" basedir="test/" reference="test/reference/fop.jar"
- refVersion="FOP 0.20.1"/>
- <runTest testSuite="bugtests.xml" basedir="test/" reference="test/reference/fop.jar"
- refVersion="FOP 0.20.1"/>
- <!--
- <runTest testSuite="testsuite.xml" basedir="TestSuite/NIST/" reference="test/reference/fop.jar"
- refVersion="FOP 0.19.0-CVS"/>
- <runTest testSuite="testsuite.xml" basedir="TestSuite/contrib/IBM/" reference="test/reference/fop.jar"
- refVersion="FOP 0.19.0-CVS"/>
- <runTest testSuite="testsuite.xml" basedir="TestSuite/contrib/FOP/" reference="test/reference/fop.jar"
- refVersion="FOP 0.19.0-CVS"/>
- <runTest testSuite="testsuite.xml" basedir="TestSuite/contrib/XEP/" reference="test/reference/fop.jar"
- refVersion="FOP 0.19.0-CVS"/>
- <runTest testSuite="testsuite.xml" basedir="TestSuite/contrib/XSLFormatter/" reference="test/reference/fop.jar"
- refVersion="FOP 0.19.0-CVS"/>
- -->
- </target>
-
- <target name="all" depends="package"/> <!-- "all" target for us Makefile converts ;-) -->
-
- <target name="package-jdk11" depends="compile-jdk11,hyphenation">
- <echo message="Creating the jar file ${build.dir}/${name}11.jar"/>
- <jar jarfile="${build.dir}/${name}-jdk11.jar"
- basedir="${build.dest}"
- includes="org/**,conf/**,hyph/**"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Prepares the docs -->
- <!-- =================================================================== -->
- <target name="prepare-docs" depends="init">
- <mkdir dir="${build.docs}"/>
- <!-- sets exec permission for antRun on Unix systems. necessary for javadoc-->
- <chmod file="${lib.dir}/bin/antRun" perm="ugo+rx" />
- </target>
-
-
- <!-- =================================================================== -->
- <!-- Creates the API documentation -->
- <!-- =================================================================== -->
- <target name="javadocs" depends="prepare-src">
- <echo message="Producing the javadoc files "/>
- <mkdir dir="${build.javadocs}"/>
- <javadoc packagenames="${packages}"
- sourcepath="${build.src}"
- destdir="${build.javadocs}"
- author="true"
- version="true"
- windowtitle="${Name} API"
- doctitle="${Name}"
- bottom="Copyright © ${year} Apache Software Foundation. All Rights Reserved."
- />
- </target>
-
- <!-- =================================================================== -->
- <!-- Creates the distribution -->
- <!-- =================================================================== -->
- <target name="dist" depends="dist-src,dist-bin"/>
-
- <target name="dist-bin" depends="package">
- <echo message="Building the binary distribution files (zip,tar)"/>
- <mkdir dir="${dist.bin.result.dir}"/>
- <copy todir="${dist.bin.result.dir}">
- <fileset refid="dist.bin"/>
- <fileset refid="dist.bin.lib"/>
- </copy>
- <mkdir dir="${dist.bin.result.dir}/build"/>
- <copy todir="${dist.bin.result.dir}/build" file="build/fop.jar"/>
- <chmod file="${dist.bin.result.dir}/fop.sh" perm="ugo+rx" />
-
- <zip zipfile="${Name}-${version}-bin.zip" basedir="${dist.bin.dir}" includes="**"/>
- <tar tarfile="${Name}-${version}-bin.tar" basedir="${dist.bin.dir}" includes="**"/>
- <gzip zipfile="${Name}-${version}-bin.tar.gz" src="${Name}-${version}-bin.tar" />
- <delete file="${Name}-${version}-bin.tar"/>
-
- </target>
-
-
- <target name="dist-src" depends="package, javadocs">
- <echo message="Building the source distribution files (zip,tar)"/>
- <mkdir dir="${dist.src.result.dir}"/>
- <copy todir="${dist.src.result.dir}">
- <fileset refid="dist.src"/>
- </copy>
- <copy todir="${dist.src.result.dir}/javadocs">
- <fileset dir="${build.javadocs}"/>
- </copy>
- <mkdir dir="${dist.src.result.dir}/build"/>
- <copy todir="${dist.src.result.dir}/build" file="build/fop.jar"/>
- <chmod file="${dist.src.result.dir}/build.sh" perm="ugo+rx" />
- <chmod file="${dist.src.result.dir}/fop.sh" perm="ugo+rx" />
-
- <zip zipfile="${Name}-${version}-src.zip" basedir="${dist.src.dir}" includes="**"/>
- <tar tarfile="${Name}-${version}-src.tar" basedir="${dist.src.dir}" includes="**"/>
- <gzip zipfile="${Name}-${version}-src.tar.gz" src="${Name}-${version}-src.tar" />
- <delete file="${Name}-${version}-src.tar"/>
-
- </target>
-
- <!-- =================================================================== -->
- <!-- Clean targets -->
- <!-- =================================================================== -->
- <target name="clean" depends="init">
- <delete dir="${build.dir}"/>
- </target>
-
- <target name="distclean" depends="clean">
- <delete dir="${dist.src.dir}"/>
- <delete dir="${dist.bin.dir}"/>
- <delete>
- <fileset dir="${basedir}" includes="${Name}-*.tar.gz"/>
- <fileset dir="${basedir}" includes="${Name}-*.zip"/>
- </delete>
- </target>
-
- </project>
|