2000-10-06 20:26:17 +04:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Build file for Rhino using Ant (see http://jakarta.apache.org/ant/index.html)
|
2000-11-01 21:43:55 +03:00
|
|
|
Requires Ant version 1.2
|
2000-10-06 20:26:17 +04:00
|
|
|
-->
|
|
|
|
<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"/>
|
2000-11-18 05:14:46 +03:00
|
|
|
<available classname="com.ibm.bsf.BSFEngine" property="bsf.present"/>
|
2000-10-06 20:26:17 +04:00
|
|
|
</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"
|
2000-11-18 05:14:46 +03:00
|
|
|
debug="${debug}">
|
2000-11-20 17:44:56 +03:00
|
|
|
<exclude name="**/BSFJavaScriptEngine.java" unless="bsf.present"/>
|
2000-11-18 05:14:46 +03:00
|
|
|
</javac>
|
2000-10-06 20:26:17 +04:00
|
|
|
</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">
|
2000-11-01 21:43:55 +03:00
|
|
|
<copy todir="${build.dest}">
|
|
|
|
<fileset dir="${src.dir}" includes="org/**/*.properties" />
|
|
|
|
</copy>
|
2000-10-06 20:26:17 +04:00
|
|
|
</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">
|
2000-11-01 21:43:55 +03:00
|
|
|
<copy todir="${dist.src}">
|
|
|
|
<fileset dir="${src.dir}"
|
|
|
|
includes="org/**/*.java,org/**/*.properties" />
|
|
|
|
</copy>
|
2000-10-06 20:26:17 +04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="copy-examples" depends="prepare">
|
2000-11-01 21:43:55 +03:00
|
|
|
<copy todir="${dist.examples}">
|
|
|
|
<fileset dir="${src.examples}" includes="*.java,*.js,*.html" />
|
|
|
|
</copy>
|
2000-10-06 20:26:17 +04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="copy-misc" depends="prepare">
|
2000-11-01 21:43:55 +03:00
|
|
|
<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>
|
2000-10-06 20:26:17 +04:00
|
|
|
</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}"/>
|
2000-11-01 21:43:55 +03:00
|
|
|
<copy todir="${dist.docs}">
|
|
|
|
<fileset dir="${cvs.docsrc.dir}"
|
|
|
|
includes="**/*.html,**/*.jpg,**/*.gif" />
|
|
|
|
</copy>
|
2000-10-06 20:26:17 +04:00
|
|
|
</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}" />
|
2000-10-06 20:26:17 +04:00
|
|
|
<zip zipfile="${src.dir}/${dist.file}"
|
|
|
|
basedir="${build.dir}"
|
|
|
|
includes="**"
|
|
|
|
excludes="classes/**" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|