blob: c24c06b24179aea6761855e8f79361751a705a1f [file] [log] [blame]
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<!-- ===========================================================================
============================================================================ -->
<project default="package" basedir=".">
<path id="libs-build-classpath">
<fileset dir="../../lib">
<include name="*.jar"/>
</fileset>
<fileset dir="../../build">
<include name="fop.jar"/>
</fileset>
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</path>
<!-- =================================================================== -->
<!-- Initialization target -->
<!-- =================================================================== -->
<target name="init">
<tstamp/>
<property name="Name" value="MathML-FOP"/>
<property name="name" value="mathml-fop"/>
<property name="version" value="0.1-CVS"/>
<filter token="version" value="${version}"/>
<property name="year" value="2002-2004"/>
<echo message="------------------- ${Name} ${version} [${year}] ----------------"/>
<property name="build.compiler" value="classic"/>
<property name="debug" value="on"/>
<property name="optimize" value="off"/>
<property name="deprecation" value="on"/>
<property name="src.dir" value="./src"/>
<property name="lib.dir" value="./lib"/>
<property name="packages" value="org.apache.fop.*"/>
<property name="build.dir" value="./build"/>
<property name="build.src" value="./build/src"/>
<property name="build.dest" value="./build/classes"/>
<property name="resource.dir" value="resources"/>
<property name="mathml.dir" value="org/apache/fop/mathml"/>
<available property="jeuclid.present" classname="net.sourceforge.jeuclid.MathBase" classpathref="libs-build-classpath"/>
</target>
<target name="jeuclid-check" depends="init" unless="jeuclid.present">
<echo message="============================================================================="/>
<echo message="jeuclid.jar is missing in the lib directory."/>
<echo message="You can download it at: http://sourceforge.net/projects/jeuclid/"/>
<echo message="============================================================================="/>
<fail message="Dependecy check failed."/>
</target>
<!-- =================================================================== -->
<!-- Help on usage -->
<!-- =================================================================== -->
<target name="usage">
<echo message="Use the -projecthelp option instead"/>
</target>
<!-- =================================================================== -->
<!-- Prepares the build directory -->
<!-- =================================================================== -->
<target name="prepare" depends="init, jeuclid-check">
<!-- create directories -->
<echo message="Preparing the build directories"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.src}"/>
<mkdir dir="${build.src}/${mathml.dir}"/>
</target>
<!-- =================================================================== -->
<!-- Prepares the source code -->
<!-- =================================================================== -->
<target name="prepare-src" depends="prepare">
<!-- copy src files -->
<copy todir="${build.src}">
<fileset dir="${src.dir}"
excludes="**/Makefile*, **/package.html"/>
</copy>
<copy todir="${build.dest}/">
<fileset dir="${resource.dir}"/>
</copy>
</target>
<!-- =================================================================== -->
<!-- Compiles the source directory -->
<!-- =================================================================== -->
<target name="compile" depends="prepare-src" description="Compile the Java sources">
<echo message="Compiling the sources "/>
<!-- create directories -->
<mkdir dir="${build.dest}"/>
<javac srcdir="${build.src}"
destdir="${build.dest}"
debug="${debug}"
deprecation="${deprecation}"
optimize="${optimize}"
excludes="">
<classpath refid="libs-build-classpath"/>
</javac>
</target>
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
<target name="package" depends="compile" description="Create jar file">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
<jar jarfile="${build.dir}/${name}.jar"
basedir="${build.dest}"
includes="**">
<manifest>
<attribute name="Implementation-Title" value="${Name}"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="Implementation-Vendor" value="Apache Software Foundation (http://xmlgraphics.apache.org/fop/)"/>
<attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}])"/>
</manifest>
</jar>
</target>
<!-- =================================================================== -->
<!-- Clean targets -->
<!-- =================================================================== -->
<target name="clean" depends="init" description="Cleans the build directory">
<delete dir="${build.dir}"/>
</target>
</project>