gecko-dev/js/rhino/build.xml

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

<?xml version="1.0" encoding="utf-8"?>
<!--
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
-->
<project name="Rhino" default="help" basedir=".">
<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"/>
<property name="rhino.jar" value="js.jar"/>
<property name="debug" value="on"/>
<property name="build.dir" value="./build"/>
<property name="classes" value="${build.dir}/classes"/>
<property name="dist.name" value="rhino${version}"/>
<property name="dist.dir" value="${build.dir}/${dist.name}"/>
<property name="dist.src" value="${dist.dir}/src"/>
<property name="dist.toolsrc" value="${dist.dir}/toolsrc"/>
<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="rhino${version}.zip"/>
<property name="dist.source-only-zip" value="rhino${version}-sources.zip"/>
<property file="apiClasses.properties"/>
<property name="docsrc.dir" value="docs"/>
<property name="dist.docsrc.dir" value="src/docs"/>
</target>
<target name="init" depends="properties">
<mkdir dir="${build.dir}"/>
<mkdir dir="${classes}"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${dist.src}"/>
<mkdir dir="${dist.toolsrc}"/>
<mkdir dir="${dist.examples}"/>
<mkdir dir="${dist.docs}"/>
<mkdir dir="${dist.apidocs}"/>
</target>
<target name="compile" depends="init">
<ant dir="src" target="compile"/>
<ant dir="toolsrc" target="compile"/>
</target>
<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"/>
</target>
<target name="jar" depends="compile">
<jar jarfile="${dist.dir}/${rhino.jar}"
basedir="${classes}"
manifest="src/manifest" />
</target>
<target name="copy-examples" depends="init">
<copy todir="${dist.examples}">
<fileset dir="examples" includes="*.java,*.js,*.html" />
</copy>
</target>
<target name="copy-misc" depends="init">
<tstamp/>
<filter token="datestamp" value="${TODAY}"/>
<copy todir="${dist.dir}" filtering="yes">
<fileset dir=".">
<patternset>
<include name="build-date"/>
</patternset>
</fileset>
</copy>
</target>
<target name="copy-all" depends="copy-source,copy-examples,copy-misc">
</target>
<target name="copy-docs" depends="init">
<echo message="copy from ${docsrc.dir}"/>
<copy todir="${dist.docs}">
<fileset dir="${docsrc.dir}"
includes="**/*.html,**/*.jpg,**/*.gif" />
</copy>
</target>
<target name="javadoc" depends="compile,copy-docs">
<javadoc sourcefiles="${apiClasses}"
sourcepath="src"
destdir="${dist.apidocs}"
overview="${dist.docs}/api.html"
version="true"
author="true"
public="true"
2001-04-25 21:11:34 +04:00
windowtitle="${Name}" />
</target>
<target name="dist" depends="jar,copy-all,javadoc">
<delete file="${dist.file}" />
<zip zipfile="${dist.file}"
basedir="${build.dir}"
includes="**"
excludes="classes/**" />
</target>
<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>
<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>
</project>