2000-10-06 20:26:17 +04:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
2003-08-06 11:47:58 +04:00
|
|
|
<!--
|
2000-10-06 20:26:17 +04:00
|
|
|
Build file for Rhino using Ant (see http://jakarta.apache.org/ant/index.html)
|
2002-02-04 18:26:31 +03:00
|
|
|
Requires Ant version 1.2 or later
|
2000-10-06 20:26:17 +04:00
|
|
|
-->
|
2003-08-06 11:47:58 +04:00
|
|
|
|
|
|
|
<project name="Rhino" default="help" basedir=".">
|
2000-10-06 20:26:17 +04:00
|
|
|
|
|
|
|
<target name="properties">
|
|
|
|
<property name="name" value="rhino"/>
|
|
|
|
<property name="Name" value="Rhino"/>
|
2003-03-25 22:11:58 +03:00
|
|
|
<property name="version" value="1_5R5pre"/>
|
2000-10-06 20:26:17 +04:00
|
|
|
<property name="rhino.jar" value="js.jar"/>
|
2003-08-06 11:47:58 +04:00
|
|
|
|
2002-03-13 22:34:23 +03:00
|
|
|
<property name="debug" value="on"/>
|
2003-08-06 11:47:58 +04:00
|
|
|
|
2000-10-06 20:26:17 +04:00
|
|
|
<property name="build.dir" value="./build"/>
|
2003-08-06 11:47:58 +04:00
|
|
|
<property name="classes" value="${build.dir}/classes"/>
|
|
|
|
|
2001-04-25 00:31:31 +04:00
|
|
|
<property name="dist.name" value="rhino${version}"/>
|
2000-10-06 20:26:17 +04:00
|
|
|
<property name="dist.dir" value="${build.dir}/${dist.name}"/>
|
|
|
|
<property name="dist.src" value="${dist.dir}/src"/>
|
2001-04-25 00:31:31 +04:00
|
|
|
<property name="dist.toolsrc" value="${dist.dir}/toolsrc"/>
|
2000-10-06 20:26:17 +04:00
|
|
|
<property name="dist.examples" value="${dist.dir}/examples"/>
|
|
|
|
<property name="dist.docs" value="${dist.dir}/docs"/>
|
|
|
|
<property name="dist.apidocs" value="${dist.docs}/apidocs"/>
|
2001-04-25 00:31:31 +04:00
|
|
|
<property name="dist.file" value="rhino${version}.zip"/>
|
2003-08-06 11:47:58 +04:00
|
|
|
<property name="dist.source-only-zip" value="rhino${version}-sources.zip"/>
|
2000-10-06 20:26:17 +04:00
|
|
|
|
|
|
|
<property file="apiClasses.properties"/>
|
2001-04-25 00:31:31 +04:00
|
|
|
<property name="docsrc.dir" value="docs"/>
|
2003-08-06 11:47:58 +04:00
|
|
|
<property name="dist.docsrc.dir" value="src/docs"/>
|
2000-10-06 20:26:17 +04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="init" depends="properties">
|
|
|
|
<mkdir dir="${build.dir}"/>
|
2003-08-06 11:47:58 +04:00
|
|
|
<mkdir dir="${classes}"/>
|
2000-10-06 20:26:17 +04:00
|
|
|
<mkdir dir="${dist.dir}"/>
|
|
|
|
<mkdir dir="${dist.src}"/>
|
2001-04-25 00:31:31 +04:00
|
|
|
<mkdir dir="${dist.toolsrc}"/>
|
2000-10-06 20:26:17 +04:00
|
|
|
<mkdir dir="${dist.examples}"/>
|
|
|
|
<mkdir dir="${dist.docs}"/>
|
|
|
|
<mkdir dir="${dist.apidocs}"/>
|
|
|
|
</target>
|
|
|
|
|
2003-08-06 11:47:58 +04:00
|
|
|
<target name="compile" depends="init">
|
|
|
|
<ant dir="src" target="compile"/>
|
|
|
|
<ant dir="toolsrc" target="compile"/>
|
2000-11-27 18:00:45 +03:00
|
|
|
</target>
|
|
|
|
|
2003-08-06 11:47:58 +04:00
|
|
|
<target name="copy-source" depends="init">
|
|
|
|
<ant dir="src" target="copy-source"/>
|
|
|
|
<ant dir="toolsrc" target="copy-source"/>
|
|
|
|
<copy todir="${dist.dir}" file="build.xml"/>
|
|
|
|
<copy todir="${dist.dir}" file="apiClasses.properties"/>
|
2000-10-06 20:26:17 +04:00
|
|
|
</target>
|
|
|
|
|
2001-04-25 00:31:31 +04:00
|
|
|
<target name="jar" depends="compile">
|
2003-08-06 11:47:58 +04:00
|
|
|
<jar jarfile="${dist.dir}/${rhino.jar}"
|
|
|
|
basedir="${classes}"
|
|
|
|
manifest="src/manifest" />
|
2000-10-06 20:26:17 +04:00
|
|
|
</target>
|
2003-08-06 11:47:58 +04:00
|
|
|
|
|
|
|
<target name="copy-examples" depends="init">
|
2000-11-01 21:43:55 +03:00
|
|
|
<copy todir="${dist.examples}">
|
2003-08-06 11:47:58 +04:00
|
|
|
<fileset dir="examples" includes="*.java,*.js,*.html" />
|
2000-11-01 21:43:55 +03:00
|
|
|
</copy>
|
2000-10-06 20:26:17 +04:00
|
|
|
</target>
|
|
|
|
|
2003-08-06 11:47:58 +04:00
|
|
|
<target name="copy-misc" depends="init">
|
2000-11-01 21:43:55 +03:00
|
|
|
<tstamp/>
|
|
|
|
<filter token="datestamp" value="${TODAY}"/>
|
|
|
|
<copy todir="${dist.dir}" filtering="yes">
|
2001-04-25 00:31:31 +04:00
|
|
|
<fileset dir=".">
|
2000-11-01 21:43:55 +03:00
|
|
|
<patternset>
|
2001-04-25 00:31:31 +04:00
|
|
|
<include name="build-date"/>
|
2000-11-01 21:43:55 +03:00
|
|
|
</patternset>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
2000-10-06 20:26:17 +04:00
|
|
|
</target>
|
|
|
|
|
2003-08-06 11:47:58 +04:00
|
|
|
<target name="copy-all" depends="copy-source,copy-examples,copy-misc">
|
2000-10-06 20:26:17 +04:00
|
|
|
</target>
|
|
|
|
|
2003-08-06 11:47:58 +04:00
|
|
|
<target name="copy-docs" depends="init">
|
2001-04-25 00:31:31 +04:00
|
|
|
<echo message="copy from ${docsrc.dir}"/>
|
2000-11-01 21:43:55 +03:00
|
|
|
<copy todir="${dist.docs}">
|
2003-08-06 11:47:58 +04:00
|
|
|
<fileset dir="${docsrc.dir}"
|
2000-11-01 21:43:55 +03:00
|
|
|
includes="**/*.html,**/*.jpg,**/*.gif" />
|
|
|
|
</copy>
|
2000-10-06 20:26:17 +04:00
|
|
|
</target>
|
|
|
|
|
2001-04-25 00:31:31 +04:00
|
|
|
<target name="javadoc" depends="compile,copy-docs">
|
2000-10-06 20:26:17 +04:00
|
|
|
<javadoc sourcefiles="${apiClasses}"
|
2003-08-06 11:47:58 +04:00
|
|
|
sourcepath="src"
|
2000-10-06 20:26:17 +04:00
|
|
|
destdir="${dist.apidocs}"
|
|
|
|
overview="${dist.docs}/api.html"
|
|
|
|
version="true"
|
|
|
|
author="true"
|
|
|
|
public="true"
|
2001-04-25 21:11:34 +04:00
|
|
|
windowtitle="${Name}" />
|
2000-10-06 20:26:17 +04:00
|
|
|
</target>
|
|
|
|
|
2003-08-06 11:47:58 +04:00
|
|
|
<target name="dist" depends="jar,copy-all,javadoc">
|
2001-04-25 00:31:31 +04:00
|
|
|
<delete file="${dist.file}" />
|
|
|
|
<zip zipfile="${dist.file}"
|
2003-08-06 11:47:58 +04:00
|
|
|
basedir="${build.dir}"
|
2000-10-06 20:26:17 +04:00
|
|
|
includes="**"
|
|
|
|
excludes="classes/**" />
|
|
|
|
</target>
|
|
|
|
|
2003-08-06 11:47:58 +04:00
|
|
|
<target name="source-zip" depends="copy-source">
|
|
|
|
<delete file="${dist.source-only-zip}" />
|
|
|
|
<zip zipfile="${dist.source-only-zip}" basedir="${build.dir}"
|
|
|
|
includes="${dist.name}/src/**,${dist.name}/toolsrc/**,${dist.name}/build.xml,${dist.name}/apiClasses.properties"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="clean" depends="properties">
|
|
|
|
<delete quiet="true" file="${dist.dir}/${rhino.jar}"/>
|
|
|
|
<delete quiet="true" dir="${classes}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="deepclean" depends="properties">
|
|
|
|
<delete quiet="true" dir="${build.dir}"/>
|
|
|
|
<delete quiet="true" file="${dist.file}"/>
|
|
|
|
<delete quiet="true" file="${dist.source-only-zip}"/>
|
2001-04-25 01:06:34 +04:00
|
|
|
</target>
|
2003-08-06 11:47:58 +04:00
|
|
|
|
|
|
|
<target name="help" depends="properties">
|
|
|
|
<echo>The following targets are available with this build file:
|
|
|
|
|
|
|
|
clean remove all compiled classes and copied property files
|
|
|
|
|
|
|
|
compile compile all classes and copy all property files
|
|
|
|
into ${classes} directory
|
|
|
|
|
|
|
|
deepclean remove all generated files and directories
|
|
|
|
|
|
|
|
dist create ${dist.file} with full Rhino distribution
|
|
|
|
|
|
|
|
help print this help
|
|
|
|
|
|
|
|
jar create ${rhino.jar} in ${dist.dir}
|
|
|
|
|
|
|
|
javadoc generate generate Rhino API documentation
|
|
|
|
in ${dist.apidocs}
|
|
|
|
|
|
|
|
source-zip create ${dist.source-only-zip} with all Rhino
|
|
|
|
source files necessary to recreate ${rhino.jar}
|
|
|
|
</echo>
|
|
|
|
</target>
|
|
|
|
|
2000-10-06 20:26:17 +04:00
|
|
|
</project>
|