123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594 |
- <?xml version="1.0"?>
- <!-- ===========================================================================
-
- * ================== *
- | FOP build system |
- * ================== *
-
- Building instructions
- =====================
-
- First, change directory to where this file is located. Then type
-
- ./build.sh (on unixes)
- build (on Windows)
-
- If everything is right and all the required packages are visible, this action
- will generate a file called "fop.jar" in the "./build" directory.
-
- If you experience any problems with the build please visit the FOP website for
- more information: http://xml.apache.org/fop
-
-
- Build targets
- =============
-
- The build system is not only responsible for compiling Fop into a jar file,
- but also 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.
-
- Call the build script (see above) with the parameter "-projecthelp" to get a
- list of possible build targets.
-
- ============================================================================ -->
- <project default="all" basedir=".">
-
- <!-- used to set values for testing etc. -->
- <!-- build-local.properties is not stored in CVS and overrides values from build.properties -->
- <property file="build-local.properties"/>
- <property file="build.properties"/>
-
- <fileset dir="${basedir}" id="dist.bin">
- <include name="conf/**"/>
- <include name="docs/**"/>
- <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/xercesImpl-2.2.1.jar"/>
- <include name="lib/xalan-2.4.1.jar"/>
- <include name="lib/xml-apis.jar"/>
- </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="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>
-
- <path id="libs-build-classpath">
- <fileset dir="lib">
- <include name="*.jar"/>
- </fileset>
- </path>
-
- <path id="libs-run-classpath">
- <fileset dir="lib">
- <include name="*.jar"/>
- <exclude name="ant.jar"/>
- </fileset>
- <fileset dir="build">
- <include name="fop.jar"/>
- </fileset>
- </path>
-
- <path id="checkstylepath">
- <fileset dir="lib">
- <include name="checkstyle-all-*.jar"/>
- </fileset>
- </path>
-
- <patternset id="base-sources">
- <include name="**/*.java"/>
- <exclude name="**/*${ignore_this}"/>
- </patternset>
-
- <!-- =================================================================== -->
- <!-- Pre-initialization target -->
- <!-- =================================================================== -->
- <target name="pre-init">
- <tstamp/>
-
- <!-- Set up initial required properties -->
- <property name="Name" value="Fop"/>
- <property name="name" value="fop"/>
- <property name="NAME" value="FOP"/>
- <property name="year" value="1999-2003"/>
-
- <!-- Compilation parameters -->
- <property name="debug" value="on"/>
- <property name="optimize" value="off"/>
- <property name="deprecation" value="on"/>
-
- <!-- Source and library directories -->
- <property name="src.dir" value="${basedir}/src"/>
- <!-- <property name="src.java" value="${src.dir}/java"/> -->
- <property name="src.java" value="${src.dir}"/>
- <property name="src.codegen" value="${src.dir}/codegen"/>
- <property name="lib.dir" value="${basedir}/lib"/>
- <property name="hyph.dir" value="${src.dir}/hyph"/>
- <property name="conf.dir" value="${basedir}/conf"/>
- <property name="fo.examples.dir" value="${basedir}/examples/fo/basic"/>
-
- <!-- Properties for derivation of Version information -->
- <property name="fop.dir" value="org/apache/fop"/>
- <property name="version.dir" value="${fop.dir}/version"/>
- <property name="version.src.java" value="${src.java}/${version.dir}"/>
-
- <property name="packages" value="org.apache.fop.*"/>
- <property name="fop.prefix" value="org.apache.fop"/>
- <property name="version.prefix" value="${fop.prefix}.version"/>
-
-
- <!-- Build directories -->
- <property name="build.dir" value="${basedir}/build"/>
- <property name="build.dest" value="${build.dir}/classes"/>
- <property name="build.tmp" value="${build.dir}/tmp"/>
- <property name="build.src" value="${build.dir}/src"/>
- <property name="build.gensrc" value="${build.dir}/gensrc"/>
- <property name="build.docsrc" value="${build.dir}/docsrc"/>
- <property name="build.codegen" value="${build.src}/codegen"/>
- <property name="build.javadocs" value="${build.dir}/javadocs"/>
- <property name="build.examples.dir" value="${build.dir}/examples"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Generate the build version properties -->
- <!-- =================================================================== -->
- <target name="version" depends="pre-init">
- <!-- create directories -->
- <echo message="Preparing the build directories"/>
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${build.dest}"/>
- <mkdir dir="${build.tmp}"/>
-
- <!-- Compile Version.java if necessary -->
- <echo message="Check for current Version class file."/>
- <property name="tmp.version.file" value="${build.tmp}/version.property"/>
- <javac srcdir="${version.src.java}" destdir="${build.dest}"
- debug="${debug}" deprecation="${deprecation}"
- optimize="${optimize}"/>
-
- <!-- Run Version.class and capture output, which defines properties
- "build.description" and "build.tag"
- or "build.default.description" and "build.default.tag". -->
- <java classname="org.apache.fop.version.Version"
- failonerror="true" output="${tmp.version.file}">
- <classpath location="${build.dest}"/>
- </java>
-
- <!-- Set the properties from the temporary output file -->
- <property file="${tmp.version.file}"/>
- <!-- Test the setting of the properties -->
- <!-- For full distributions, this test could be used to trigger a
- CVS checkout of a tag defined in build-local.properties
- Final propertes are:
- build.display.name - the formatted Tag value
- build.tag.name - the unformatted Tag value
- -->
- <condition property="build.display.name" value="${build.description}">
- <isset property="build.description"/>
- </condition>
- <condition property="build.tag.name" value="${build.tag}">
- <isset property="build.tag"/>
- </condition>
-
- <condition property="build.display.name" value="${build.default.description}">
- <isset property="build.default.description"/>
- </condition>
- <condition property="build.tag.name" value="${build.default.tag}">
- <isset property="build.default.tag"/>
- </condition>
-
- <echo message="------------------- ${build.display.name} [${year}] ----------------"/>
- <echo message="See build.properties and build-local.properties for additional build settings"/>
-
- </target>
-
- <!-- =================================================================== -->
- <!-- Post-initialization target -->
- <!-- =================================================================== -->
- <target name="post-init" depends="pre-init, version">
-
- <property name="textfontencoding" value="WinAnsiEncoding"/>
-
- <property name="dist.bin.dir" value="${basedir}/dist-bin"/>
- <property name="dist.src.dir" value="${basedir}/dist-src"/>
- <property name="dist.bin.result.dir"
- value="${dist.bin.dir}/${build.tag.name}"/>
- <property name="dist.src.result.dir"
- value="${dist.src.dir}/${build.tag.name}"/>
-
- <property name="fonts.dir" value="org/apache/fop/fonts/base14"/>
- <property name="ignore_this" value="ignore_this.dummy"/>
- <property name="jimi" value="JimiImage.java"/>
- <property name="jai" value="JAIImage.java"/>
-
- <property name="xslt" value="org.apache.xalan.xslt.Process"/>
-
- <property name="encodings.xml" value="${build.codegen}/encodings.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}/CourierOblique.xml"/>
- <property name="Courier-Bold.xml" value="${build.codegen}/CourierBold.xml"/>
- <property name="Courier-BoldOblique.xml" value="${build.codegen}/CourierBoldOblique.xml"/>
- <property name="Helvetica.xml" value="${build.codegen}/Helvetica.xml"/>
- <property name="Helvetica-Oblique.xml" value="${build.codegen}/HelveticaOblique.xml"/>
- <property name="Helvetica-Bold.xml" value="${build.codegen}/HelveticaBold.xml"/>
- <property name="Helvetica-BoldOblique.xml" value="${build.codegen}/HelveticaBoldOblique.xml"/>
- <property name="Times-Roman.xml" value="${build.codegen}/TimesRoman.xml"/>
- <property name="Times-Italic.xml" value="${build.codegen}/TimesItalic.xml"/>
- <property name="Times-Bold.xml" value="${build.codegen}/TimesBold.xml"/>
- <property name="Times-BoldItalic.xml" value="${build.codegen}/TimesBoldItalic.xml"/>
- <property name="ZapfDingbats.xml" value="${build.codegen}/ZapfDingbats.xml"/>
- <property name="Symbol.xml" value="${build.codegen}/Symbol.xml"/>
-
- <property name="tools.pkg" value="org/apache/fop/tools"/>
-
- <property name="main.class" value="org.apache.fop.apps.Fop"/>
-
- </target>
-
- <!-- =================================================================== -->
- <!-- Initialization target -->
- <!-- =================================================================== -->
- <target name="init" depends="pre-init, version, post-init">
- </target>
-
- <!-- =================================================================== -->
- <!-- Help on usage -->
- <!-- =================================================================== -->
- <target name="usage">
- <echo message="Use the -projecthelp option instead"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Prepares the build directory -->
- <!-- =================================================================== -->
- <target name="prepare" depends="init">
- <!-- create remaining directories
- Note that some directories have been created by the 'version' target.
- -->
- <echo message="Preparing the build directories"/>
- <mkdir dir="${build.src}"/>
- <mkdir dir="${build.gensrc}"/>
- <mkdir dir="${build.gensrc}/${properties.dir}"/>
- <mkdir dir="${build.gensrc}/${fonts.dir}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Generate the source code -->
- <!-- =================================================================== -->
- <target name="codegen" depends="prepare" description="Generates the java files from the xml resources">
- <!-- resetting codegen directory -->
- <echo message="Resetting codegen directory"/>
-
- <!-- copy codegen directory -->
- <copy todir="${build.codegen}">
- <fileset dir="${src.codegen}"/>
- </copy>
-
- <!-- generate the java files from xml resources -->
- <echo message="Generating the java files from xml resources"/>
-
- <style in="${encodings.xml}" style="${charlist.xsl}"
- out="${build.gensrc}/${fop.dir}/fonts//CodePointMapping.java"/>
-
- <style in="${Courier.xml}" style="${fontfile.xsl}"
- destdir="${build.gensrc}/${fop.dir}/fonts/base14"
- out="${build.gensrc}/${fop.dir}/fonts/base14/Courier.java">
- <param name="encoding" expression="${textfontencoding}"/>
- </style>
-
- <style in="${Courier-Oblique.xml}" style="${fontfile.xsl}"
- destdir="${build.gensrc}/${fop.dir}/fonts/base14"
- out="${build.gensrc}/${fop.dir}/fonts/base14/CourierOblique.java">
- <param name="encoding" expression="${textfontencoding}"/>
- </style>
-
- <style in="${Courier-Bold.xml}" style="${fontfile.xsl}"
- destdir="${build.gensrc}/${fop.dir}/fonts/base14"
- out="${build.gensrc}/${fop.dir}/fonts/base14/CourierBold.java">
- <param name="encoding" expression="${textfontencoding}"/>
- </style>
-
- <style in="${Courier-BoldOblique.xml}" style="${fontfile.xsl}"
- destdir="${build.gensrc}/${fop.dir}/fonts/base14"
- out="${build.gensrc}/${fop.dir}/fonts/base14/CourierBoldOblique.java">
- <param name="encoding" expression="${textfontencoding}"/>
- </style>
-
- <style in="${Helvetica.xml}" style="${fontfile.xsl}"
- destdir="${build.gensrc}/${fop.dir}/fonts/base14"
- out="${build.gensrc}/${fop.dir}/fonts/base14/Helvetica.java">
- <param name="encoding" expression="${textfontencoding}"/>
- </style>
-
- <style in="${Helvetica-Bold.xml}" style="${fontfile.xsl}"
- destdir="${build.gensrc}/${fop.dir}/fonts/base14"
- out="${build.gensrc}/${fop.dir}/fonts/base14/HelveticaBold.java">
- <param name="encoding" expression="${textfontencoding}"/>
- </style>
-
- <style in="${Helvetica-Oblique.xml}" style="${fontfile.xsl}"
- destdir="${build.gensrc}/${fop.dir}/fonts/base14"
- out="${build.gensrc}/${fop.dir}/fonts/base14/HelveticaOblique.java">
- <param name="encoding" expression="${textfontencoding}"/>
- </style>
-
- <style in="${Helvetica-BoldOblique.xml}" style="${fontfile.xsl}"
- destdir="${build.gensrc}/${fop.dir}/fonts/base14"
- out="${build.gensrc}/${fop.dir}/fonts/base14/HelveticaBoldOblique.java">
- <param name="encoding" expression="${textfontencoding}"/>
- </style>
-
- <style in="${Times-Roman.xml}" style="${fontfile.xsl}"
- destdir="${build.gensrc}/${fop.dir}/fonts/base14"
- out="${build.gensrc}/${fop.dir}/fonts/base14/TimesRoman.java">
- <param name="encoding" expression="${textfontencoding}"/>
- </style>
-
- <style in="${Times-Italic.xml}" style="${fontfile.xsl}"
- destdir="${build.gensrc}/${fop.dir}/fonts/base14"
- out="${build.gensrc}/${fop.dir}/fonts/base14/TimesItalic.java">
- <param name="encoding" expression="${textfontencoding}"/>
- </style>
-
- <style in="${Times-Bold.xml}" style="${fontfile.xsl}"
- out="${build.gensrc}/${fop.dir}/fonts/base14/TimesBold.java">
- <param name="encoding" expression="${textfontencoding}"/>
- </style>
-
- <style in="${Times-BoldItalic.xml}" style="${fontfile.xsl}"
- out="${build.gensrc}/${fop.dir}/fonts/base14/TimesBoldItalic.java">
- <param name="encoding" expression="${textfontencoding}"/>
- </style>
-
- <style in="${Symbol.xml}" style="${fontfile.xsl}"
- out="${build.gensrc}/${fop.dir}/fonts/base14/Symbol.java"/>
-
- <style in="${ZapfDingbats.xml}" style="${fontfile.xsl}"
- out="${build.gensrc}/${fop.dir}/fonts/base14/ZapfDingbats.java"/>
-
- </target>
-
- <!-- =================================================================== -->
- <!-- Compiles the source directory -->
- <!-- =================================================================== -->
- <target name="compile-src" depends="codegen, prepare">
- <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 destdir="${build.dest}" debug="${debug}" deprecation="${deprecation}" optimize="${optimize}">
- <src path="${build.gensrc}"/>
- <src path="${src.java}"/>
- <patternset refid="exclude-jce-dependencies"/>
- <patternset refid="exclude-jai"/>
- <patternset refid="exclude-jimi"/>
- <classpath refid="libs-build-classpath"/>
- <patternset refid="base-sources"/>
- </javac>
- </target>
-
- <target name="compile" depends="compile-src" description="Compiles the source code"/>
-
- <!-- =================================================================== -->
- <!-- Creates the class package -->
- <!-- =================================================================== -->
- <target name="package" depends="compile" description="Generates the jar files">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
-
- <tstamp>
- <format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
- </tstamp>
- <pathconvert property="manifest-classpath" dirsep="/" pathsep=" " refid="libs-run-classpath">
- <map from="${basedir}${file.separator}lib${file.separator}" to=""/>
- <map from="${basedir}${file.separator}build${file.separator}fop.jar" to=""/>
- </pathconvert>
-
- <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}" includes="org/**">
- <manifest>
- <attribute name="Main-Class" value="${main.class}"/>
- <attribute name="Class-Path" value="${manifest-classpath}"/>
- <attribute name="Implementation-Title" value="${Name}"/>
- <attribute name="Implementation-Version" value="${build.display.name}"/>
- <attribute name="Implementation-Vendor" value="Apache Software Foundation (http://xml.apache.org/fop/)"/>
- <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}])"/>
- </manifest>
- </jar>
- </target>
-
- <target name="all" depends="package"/> <!-- "all" target for us Makefile converts ;-) -->
-
- <!-- =================================================================== -->
- <!-- Prepares the docs -->
- <!-- =================================================================== -->
- <target name="prepare-docs" depends="init">
- <mkdir dir="${build.docs}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Creates the API documentation -->
- <!-- =================================================================== -->
- <target name="javadocs" depends="prepare" description="Generates javadocs">
- <echo message="Producing the javadoc files "/>
- <mkdir dir="${build.javadocs}"/>
-
- <javadoc
- packagenames="${packages}"
- destdir="${build.javadocs}"
- classpathref="libs-build-classpath"
- author="true"
- version="true"
- windowtitle="${NAME} API"
- doctitle="Formatting Objects Processor (FOP)"
- bottom="Copyright © ${year} Apache Software Foundation. All Rights Reserved."
- overview="${src.dir}/java/org/apache/fop/overview.html"
- use="true"
- failonerror="true">
- <sourcepath>
- <pathelement path="${src.java}"/>
- <pathelement path="${build.gensrc}"/>
- </sourcepath>
- <group title="Control and Startup">
- <package name="org.apache.fop.apps"/>
- <package name="org.apache.fop.configuration"/>
- <package name="org.apache.fop.messaging"/>
- <package name="org.apache.fop.servlet"/>
- </group>
- <group title="XSL-FO Tree">
- <package name="org.apache.fop.fo"/>
- <package name="org.apache.fop.fo.*"/>
- <package name="org.apache.fop.datatypes"/>
- <package name="org.apache.fop.extensions"/>
- </group>
- <group title="Layout">
- <package name="org.apache.fop.layoutmgr"/>
- <package name="org.apache.fop.layoutmgr.*"/>
- <package name="org.apache.fop.layout"/>
- <package name="org.apache.fop.layout.*"/>
- </group>
- <group title="Area Tree">
- <package name="org.apache.fop.area"/>
- <package name="org.apache.fop.area.*"/>
- </group>
- <group title="Paginated Rendering">
- <package name="org.apache.fop.render"/>
- <package name="org.apache.fop.render.*"/>
- <package name="org.apache.fop.viewer"/>
- </group>
- <group title="Structural Rendering">
- <package name="org.apache.fop.rtf.renderer"/>
- </group>
- <group title="Utility">
- <package name="org.apache.fop.pdf"/>
- <package name="org.apache.fop.mif"/>
- <package name="org.apache.fop.tools"/>
- <package name="org.apache.fop.tools.*"/>
- <package name="org.apache.fop.svg"/>
- <package name="org.apache.fop.image"/>
- <package name="org.apache.fop.image.*"/>
- <package name="org.apache.fop.fonts"/>
- <package name="org.apache.fop.fonts.*"/>
- <package name="org.apache.fop.util"/>
- </group>
- </javadoc>
- </target>
-
- <!-- =================================================================== -->
- <!-- Checkstyle -->
- <!-- =================================================================== -->
- <target name="checkstyle" depends="prepare" description="Runs Checkstyle for a code quality report">
- <available property="checkstyle.available" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask" classpathref="checkstylepath"/>
- <fail message="Please put checkstyle-all-*.jar in the lib directory. Get it from http://checkstyle.sourceforge.net" unless="checkstyle.available"/>
- <taskdef name="checkstyle" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask" classpathref="checkstylepath"/>
-
- <checkstyle properties="checkstyle.cfg" failonviolation="false">
- <fileset dir="${src.java}" includes="org/apache/fop/**/*.java"/>
- <formatter type="plain" toFile="${build.dir}/checkstyle_report.txt"/>
- <formatter type="xml" toFile="${build.dir}/checkstyle_report.xml"/>
- </checkstyle>
- <available property="checkstyle.stylesheet.available" file="checkstyle-noframes.xsl"/>
- <antcall target="checkstyle-html"/>
- </target>
-
- <target name="checkstyle-html" if="checkstyle.stylesheet.available">
- <style in="${build.dir}/checkstyle_report.xml" out="${build.dir}/checkstyle_report.html" style="checkstyle-noframes.xsl"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Creates the distribution -->
- <!-- =================================================================== -->
- <target name="dist" depends="dist-src,dist-bin" description="Generates the distribution package"/>
-
- <target name="dist-bin" depends="all">
- <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="all, 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" description="Cleans the build directory">
- <delete dir="${build.dir}"/>
- </target>
-
- <target name="distclean" depends="clean" description="Cleans the distribution target directories">
- <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>
|