File:  [mozdev] / forecastfox / Attic / build.xml
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Tue Nov 16 16:55:09 2004 UTC (15 years, 2 months ago) by richwklein
Branches: MAIN
CVS tags: HEAD
fine tune build script

<?xml version="1.0"?>
<project name="forecastfox" default="dist">

	<property name="build"      location="build"/>
  <property name="src"        location="src"/>
	  
	<target name="init">
		<!-- create the time stamp -->
		<tstamp/>
	  
		<!-- create the build directory structure used by compile -->
		<mkdir dir="${build}"/>  
	</target>

  <target name="compile" depends="init">    
    <!-- run all these in parallel for speed-->
    <parallel>
      <ant target="chrome"/>
      <ant target="components"/>
      <ant target="defaults"/>
      <ant target="install"/>
    </parallel>    
  </target>
  
  <!-- zip chrome directory -->
  <target name="chrome">
    <mkdir dir="${build}/chrome"/>
		<zip destfile="${build}/chrome/${ant.project.name}.jar" basedir="${src}/chrome"/>    
  </target>

  <!-- copy components -->
  <target name="components">
    <copy todir="${build}/components">
      <fileset dir="${src}/components">
        <!-- We don't actually need the idl -->
        <exclude name="*.idl"/>
      </fileset>
    </copy>    
  </target>

  <!-- copy defaults -->
  <target name="defaults">
    <copy todir="${build}/defaults">
      <fileset dir="${src}/defaults"/>
    </copy>    
  </target>

  <!-- copy install -->
  <target name="install">
    <copy todir="${build}">
      <fileset dir="${src}">
        <include name="install.*"/>        
      </fileset>
    </copy>      
  </target>

  <!-- create XPI in donwloads directory -->  
  <target name="dist" depends="compile">
    <mkdir dir="downloads"/>
		<zip destfile="downloads/${ant.project.name}-${DSTAMP}${TSTAMP}.xpi" basedir="${build}"/>
    <ant target="clean"/>
	</target>

  <!-- cleanup build directory -->
  <target name="clean">
		<delete dir="${build}"/>    
  </target>
</project>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>