gecko-dev/js/rhino/build.xml

150 строки
4.9 KiB
XML
Исходник Обычный вид История

<?xml version="1.0" encoding="utf-8"?>
<!--
Build file for Rhino using Ant (see http://jakarta.apache.org/ant/index.html)
Requires Ant version 1.2
-->
<project name="Rhino" default="package" basedir=".">
<target name="properties">
<property name="name" value="rhino"/>
<property name="Name" value="Rhino"/>
<property name="rhino.jar" value="js.jar"/>
<property name="build.compiler" value="classic"/>
<property name="debug" value="off"/>
<property name="src.dir" value="."/>
<property name="src.examples" value="${src.dir}/examples"/>
<property name="build.dir" value="./build"/>
<property name="build.dest" value="${build.dir}/classes"/>
<property name="dist.name" value="rhino15R2pre"/>
<property name="dist.dir" value="${build.dir}/${dist.name}"/>
<property name="dist.src" value="${dist.dir}/src"/>
<property name="dist.examples" value="${dist.dir}/examples"/>
<property name="dist.docs" value="${dist.dir}/docs"/>
<property name="dist.apidocs" value="${dist.docs}/apidocs"/>
<property name="dist.file" value="rhinoTip.zip"/>
<property file="apiClasses.properties"/>
<property name="cvs.javasrc.dir" value="${src.dir}"/>
<property name="cvs.docsrc.dir" value="../../../mozilla-org/html/rhino/"/>
<property name="dist.javasrc.dir" value="${src.dir}/src"/>
<property name="dist.docsrc.dir" value="${src.dir}/docs"/>
<available file="${cvs.javasrc.dir}/org" property="in-cvs-tree"/>
<available classname="com.ibm.bsf.BSFEngine" property="bsf.present"/>
</target>
<target name="init" depends="properties">
</target>
<target name="prepare" depends="init">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.dest}"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${dist.src}"/>
<mkdir dir="${dist.examples}"/>
<mkdir dir="${dist.docs}"/>
<mkdir dir="${dist.apidocs}"/>
</target>
<target name="compile-from-cvs" if="in-cvs-tree" depends="prepare">
<javac srcdir="${cvs.javasrc.dir}"
destdir="${build.dest}"
includes="org/**/*.java"
deprecation="on"
debug="${debug}">
2000-11-20 17:44:56 +03:00
<exclude name="**/BSFJavaScriptEngine.java" unless="bsf.present"/>
</javac>
</target>
<target name="compile-from-dist" unless="in-cvs-tree" depends="prepare">
<javac srcdir="${dist.javasrc.dir}"
destdir="${build.dest}"
includes="org/**/*.java"
deprecation="on"
debug="${debug}" />
</target>
<target name="compile" depends="compile-from-dist,compile-from-cvs"/>
<target name="copy-properties" depends="prepare">
<copy todir="${build.dest}">
<fileset dir="${src.dir}" includes="org/**/*.properties" />
</copy>
</target>
<target name="jar" depends="compile,copy-properties">
<jar jarfile="${dist.dir}/${rhino.jar}"
basedir="${build.dest}"
manifest="${src.dir}/manifest" />
</target>
<target name="copy-source" depends="prepare">
<copy todir="${dist.src}">
<fileset dir="${src.dir}"
includes="org/**/*.java,org/**/*.properties" />
</copy>
</target>
<target name="copy-examples" depends="prepare">
<copy todir="${dist.examples}">
<fileset dir="${src.examples}" includes="*.java,*.js,*.html" />
</copy>
</target>
<target name="copy-misc" depends="prepare">
<tstamp/>
<filter token="datestamp" value="${TODAY}"/>
<copy todir="${dist.dir}" filtering="yes">
<fileset dir="${src.dir}">
<patternset>
<include name="build.xml"/>
<include name="apiClasses.properties"/>
<include name="manifest"/>
<include name="built-on-date"/>
</patternset>
</fileset>
</copy>
</target>
<target name="copy-all" depends="copy-source,copy-examples,copy-misc">
</target>
<target name="copy-docs-cvs" if="in-cvs-tree" depends="prepare">
<echo message="copy from ${cvs.docsrc.dir}"/>
<copy todir="${dist.docs}">
<fileset dir="${cvs.docsrc.dir}"
includes="**/*.html,**/*.jpg,**/*.gif" />
</copy>
</target>
<target name="copy-docs-dist" unless="in-cvs-tree" depends="prepare">
<echo message="Docs and source not copied on build from dist."/>
</target>
<target name="copy-docs" depends="copy-docs-dist,copy-docs-cvs"/>
<target name="javadoc" if="in-cvs-tree" depends="copy-source,copy-docs">
<javadoc sourcefiles="${apiClasses}"
sourcepath="${dist.src}"
destdir="${dist.apidocs}"
overview="${dist.docs}/api.html"
version="true"
author="true"
public="true"
windowtitle="${Name}" />
</target>
<target name="package" depends="jar,copy-all,javadoc">
2000-10-23 19:44:05 +04:00
<delete file="${src.dir}/${dist.file}" />
<zip zipfile="${src.dir}/${dist.file}"
basedir="${build.dir}"
includes="**"
excludes="classes/**" />
</target>
</project>