java-saxon6/java-saxon.build.script

92 lines
2.7 KiB
Plaintext
Raw Normal View History

<!-- simple generic build file -->
<project name="saxon" default="all" basedir=".">
<!-- Properties -->
<property name="name" value="saxon"/>
<property name="src" value="src"/>
<property name="build" value="build"/>
<property name="build.classes" value="${build}/classes"/>
<property name="build.doc" value="${build}/api"/>
<property name="build.lib" value="${build}/lib"/>
<property name="j2se.javadoc" value="/usr/share/javadoc/j2se"/>
<property name="jdom.javadoc" value="/usr/share/javadoc/jdom"/>
<property name="fop.javadoc" value="/usr/share/javadoc/fop"/>
<!-- Targets -->
<!-- Prepare build directories -->
<target name="prepare">
<mkdir dir="${src}"/>
<mkdir dir="${build}"/>
<mkdir dir="${build.classes}"/>
<mkdir dir="${build.lib}"/>
<mkdir dir="${build.doc}"/>
<copy todir="${src}">
<fileset dir="." includes="com/**,org/**"/>
</copy>
</target>
<!-- Kill all the created directories -->
<target name="clean">
<delete dir="${build}"/>
<delete dir="${src}"/>
</target>
<!-- Build classes -->
<target name="classes" depends="prepare">
<javac srcdir="${src}" destdir="${build.classes}"/>
</target>
<!-- Build jar archives -->
<target name="jar" depends="classes">
<!-- aelfred -->
<jar destfile="${build.lib}/${name}-aelfred.jar"
basedir="${build.classes}"
includes="com/icl/saxon/aelfred/*">
<metainf dir="META-INF"
includes="services/javax.xml.parsers.*" />
</jar>
<!-- fop -->
<jar destfile="${build.lib}/${name}-fop.jar"
basedir="${build.classes}"
includes="com/icl/saxon/fop/*"/>
<!-- jdom -->
<jar destfile="${build.lib}/${name}-jdom.jar"
basedir="${build.classes}"
includes="com/icl/saxon/jdom/*"/>
<!-- main -->
<jar jarfile="${build.lib}/${name}.jar"
basedir="${build.classes}"
excludes="com/icl/saxon/fop/,com/icl/saxon/jdom/,com/icl/saxon/aelfred/">
<metainf dir="META-INF"
includes="services/javax.xml.transform.*" />
<manifest>
<attribute name="Main-Class" value="com.icl.saxon.StyleSheet" />
</manifest>
</jar>
</target>
<!-- Build the full JavaDocs -->
<target name="javadoc" depends="prepare">
<javadoc sourcepath="${src}"
destdir="${build.doc}"
doctitle="${name} JavaDoc"
windowtitle="${name} JavaDoc"
package="true"
author="true"
version="true"
packagenames="com.icl.saxon.*,org.w3c.xsl.*"
>
<link href="${j2se.javadoc}"/>
<link href="${jdom.javadoc}"/>
<link href="${fop.javadoc}"/>
</javadoc>
</target>
<!-- Build everything -->
<target name="all" depends="jar,javadoc"/>
</project>