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"/>
|
2000-11-27 18:00:45 +03:00
|
|
|
<property name="src.debugger"
|
|
|
|
value="${src.dir}/org/mozilla/javascript/tools/debugger"/>
|
2000-10-06 20:26:17 +04:00
|
|
|
|
|
|
|
<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-27 18:00:45 +03:00
|
|
|
<available file="${src.debugger}/AbstractCellEditor.java"
|
|
|
|
property="swing-ex-available"/>
|
2000-11-28 01:23:40 +03:00
|
|
|
<available classname="java.lang.reflect.Proxy"
|
|
|
|
property="jdk1.3"/>
|
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>
|
|
|
|
|
2000-11-27 18:00:45 +03:00
|
|
|
<target name="get-swing-ex" unless="swing-ex-available">
|
|
|
|
<!-- Download source from Sun's site, unzip it, remove
|
|
|
|
the files we don't need, and change the package
|
|
|
|
-->
|
|
|
|
<get src="http://java.sun.com/products/jfc/tsc/articles/treetable2/downloads/src.zip" dest="${build.dir}/swingExSrc.zip"/>
|
|
|
|
<unzip src="${build.dir}/swingExSrc.zip" dest="${src.debugger}"/>
|
|
|
|
<delete file="${src.debugger}/FileSystemModel2.java" />
|
|
|
|
<delete file="${src.debugger}/MergeSort.java" />
|
|
|
|
<delete file="${src.debugger}/TreeTableExample2.java" />
|
|
|
|
<replace file="${src.debugger}/AbstractCellEditor.java">
|
|
|
|
<replacetoken>import java.awt.Component;</replacetoken>
|
|
|
|
<replacevalue>
|
|
|
|
package org.mozilla.javascript.tools.debugger;
|
|
|
|
import java.awt.Component;
|
|
|
|
</replacevalue>
|
|
|
|
</replace>
|
|
|
|
<replace file="${src.debugger}/AbstractTreeTableModel.java">
|
|
|
|
<replacetoken>import javax.swing.tree.*;</replacetoken>
|
|
|
|
<replacevalue>
|
|
|
|
package org.mozilla.javascript.tools.debugger;
|
|
|
|
import javax.swing.tree.*;
|
|
|
|
</replacevalue>
|
|
|
|
</replace>
|
|
|
|
<replace file="${src.debugger}/JTreeTable.java">
|
|
|
|
<replacetoken>import javax.swing.*;</replacetoken>
|
|
|
|
<replacevalue>
|
|
|
|
package org.mozilla.javascript.tools.debugger;
|
|
|
|
import javax.swing.*;
|
|
|
|
</replacevalue>
|
|
|
|
</replace>
|
|
|
|
<replace file="${src.debugger}/TreeTableModel.java">
|
|
|
|
<replacetoken>import javax.swing.tree.TreeModel;</replacetoken>
|
|
|
|
<replacevalue>
|
|
|
|
package org.mozilla.javascript.tools.debugger;
|
|
|
|
import javax.swing.tree.TreeModel;
|
|
|
|
</replacevalue>
|
|
|
|
</replace>
|
|
|
|
<replace file="${src.debugger}/TreeTableModelAdapter.java">
|
|
|
|
<replacetoken>import javax.swing.JTree;</replacetoken>
|
|
|
|
<replacevalue>
|
|
|
|
package org.mozilla.javascript.tools.debugger;
|
|
|
|
import javax.swing.JTree;
|
|
|
|
</replacevalue>
|
|
|
|
</replace>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile-from-cvs"
|
|
|
|
if="in-cvs-tree"
|
|
|
|
depends="prepare,get-swing-ex">
|
2000-10-06 20:26:17 +04:00
|
|
|
<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-28 01:23:40 +03:00
|
|
|
<exclude name="**/debugger/*.java" unless="jdk1.3"/>
|
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}"
|
2000-11-28 01:23:40 +03:00
|
|
|
includes="org/**/*.java,org/**/*.properties"
|
|
|
|
excludes="**/AbstractCellEditor.java,**/TreeTableModel.java,**/AbstractTreeTableModel.java,**/TreeTableModelAdapter.java,**/JTreeTable.java" />
|
2000-11-01 21:43:55 +03:00
|
|
|
</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>
|
|
|
|
|
2000-11-28 01:23:40 +03:00
|
|
|
<target name="package" depends="copy-all,jar,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>
|