LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File saxon8.build.script of Package saxon8 (Project Java:packages)

<!-- simple generic build file -->

<project name="saxon" default="all" basedir=".">

  <!-- Properties -->

  <property name="name" value="saxon8"/>
  <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 -->
<!--
  3118502  11-22-05 14:03   saxon8.jar
    43963  11-22-05 14:03   saxon8-dom.jar
    14206  11-22-05 14:03   saxon8-jdom.jar
    14720  11-22-05 14:03   saxon8-sql.jar
    16776  11-22-05 14:03   saxon8-xom.jar
    37925  11-22-05 14:03   saxon8-xpath.jar
-->
  <target name="jar" depends="classes">
    <!-- dom -->
    <jar destfile="${build.lib}/${name}-dom.jar"
         basedir="${build.classes}"
         includes="net/sf/saxon/dom/*"/>
    <!-- jdom -->
    <jar destfile="${build.lib}/${name}-jdom.jar"
         basedir="${build.classes}"
         includes="net/sf/saxon/jdom/*"/>
    <!-- sql -->
    <jar destfile="${build.lib}/${name}-sql.jar"
         basedir="${build.classes}"
         includes="net/sf/saxon/sql/*"/>
    <!-- xom -->
    <jar destfile="${build.lib}/${name}-xom.jar"
         basedir="${build.classes}"
         includes="net/sf/saxon/xom/*"/>
    <!-- xpath -->
    <jar destfile="${build.lib}/${name}-xpath.jar"
         basedir="${build.classes}"
         includes="net/sf/saxon/xpath/*">
      <metainf dir="src/META-INF"
               includes="services/javax.xml.xpath.*" />
    </jar>
    <!-- main -->
    <jar jarfile="${build.lib}/${name}.jar"
         basedir="${build.classes}"
         excludes="net/sf/saxon/xom/,net/sf/saxon/xpath/,net/sf/saxon/sql/,net/sf/saxon/dom/,net/sf/saxon/jdom/">
      <metainf dir="src/META-INF"
               includes="services/javax.xml.transform.*" />
      <manifest>
        <attribute name="Main-Class" value="net.sf.saxon.Transform" />
      </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="net.sf.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>