view build.xml @ 1:5f60298bcc0b

Added build file (for ant) with the compile-matlab target (still with my filesystem's local paths).
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Wed, 27 Nov 2013 12:09:16 +0000
parents
children 747ae11a8af8
line wrap: on
line source
<project name="EchoWebApp" default="compile-matlab" basedir=".">
    <description>
        Simple build file for the EchoLocation WebApp.
    </description>

  <!-- set global properties for this build -->
  <property name="matlab_src" location="webapp/WEB-INF/mcode/"/>
  <property name="build" location="scratch"/>
  <property name="dist"  location="dist"/>

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


  <target name="compile-matlab" depends="init"
    description="compile the MATLAB source" >
    <exec executable="/Applications/MATLAB_R2013b.app/bin/mcc">
      <!-- Will create the java package with the HumanEcho class -->
      <arg value='-W "java:uk.ac.soton.isvr,HumanEcho" -d ${build} -T "link:lib" -v "class{HumanEcho:./webapp/WEB-INF/mcode/gen_echo.m}"'/>
    </exec>
  </target>

  <target name="dist" depends="compile-matlab"
        description="generate the distribution" >
    <!-- Create the distribution directory -->
    <mkdir dir="${dist}/lib"/>

    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
    <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
  </target>

  <target name="clean"
        description="clean up" >
    <!-- Delete the ${build} and ${dist} directory trees -->
    <delete dir="${build}"/>
    <delete dir="${dist}"/>
  </target>
</project>