1<!-- 2******************************************************************************* 3* Copyright (C) 2011-2014, International Business Machines Corporation and * 4* others. All Rights Reserved. * 5******************************************************************************* 6--> 7<project name="samples" default="build" basedir="."> 8 <property file="build-local.properties"/> 9 <property file="build.properties"/> 10 <import file="${shared.dir}/build/common-targets.xml"/> 11 12 <path id="javac.classpathref"> 13 <path refid="javac.classpathref.${ant.project.name}"/> 14 </path> 15 <property name="jar.name" value="icu4j-${ant.project.name}.jar"/> 16 <property name="src.jar.name" value="icu4j-${ant.project.name}-src.jar"/> 17 18 <target name="build" depends="compile, copy, jar, src-jar" description="Build the project"/> 19 20 <target name="build-all" depends="@build-all" description="Build the project including all dependencies"/> 21 22 <target name="clean" depends="@clean" description="Clean up the build outputs"/> 23 24 <target name="compile" depends="@compile" description="Compile java source files"/> 25 26 <target name="copy" depends="@copy" description="Copy non-java runtime files to the project's binary directory"/> 27 28 <target name="jar" depends="compile, copy, @jar" description="Create the project's jar file"/> 29 30 <target name="src-jar" depends="@src-jar" description="Create the project's source jar file"/> 31 32 <target name="rebuild-iuc-data" description="Rebuild IUC sample data"> 33 <!-- package to build into --> 34 <property name="iuc.package" value="com/ibm/icu/samples/iuc" /> 35 <!-- output location --> 36 <property name="iuc.dataoutdir" value="src/${iuc.package}/data" /> 37 <!-- tmp location --> 38 <property name="iuc.tmp" value="out/tmp" /> 39 <property name="iuc.res.src" value="c" /> 40 <!-- property for the root dir of our messages. --> 41 <fail unless="iuc.res.src" message="Please set -Diuc.res.src=/path/ where /path/ is a checkout of http://source.icu-project.org/repos/icu/icuapps/trunk/icufacts/c" /> 42 <!-- properties for the two packages we will be building. --> 43 <property name="iuc.res.reshello" value="reshello" /> 44 <property name="iuc.res.popmsg" value="popmsg" /> 45 <!-- paths for these two packages --> 46 <property name="iuc.res.reshello.path" value="${iuc.res.src}/s30_reshello/${iuc.res.reshello}" /> 47 <property name="iuc.res.popmsg.path" value="${iuc.res.src}/s40_popmsg/${iuc.res.popmsg}" /> 48 <property name="iuc.bldicures" value="${iuc.res.src}/bldicures.py" /> 49 <!-- <available file="${iuc.bldicures}" type="file" property="iuc.bldicures.present" /> --> 50 <fail unless="iuc.bldicures" message="Please set -Diuc.bldicures=/path/bldicures.py - which you can get from <http://source.icu-project.org/repos/icu/tools/trunk/scripts/bldicures.py>" /> 51 <mkdir dir="${iuc.tmp}" /> 52 <!-- make reshello --> 53 <delete dir="${iuc.tmp}/${iuc.res.reshello}" /> <!-- clean up --> 54 <exec executable="${iuc.bldicures}"> 55 <arg value="-v" /> 56 <arg value="--endian" /> 57 <arg value="big" /> 58 <arg value="--mode" /> 59 <arg value="files" /> 60 <arg value="--from" /> 61 <arg value="${iuc.res.reshello.path}" /> 62 <arg value="--dest" /> 63 <arg value="${iuc.tmp}/${iuc.res.reshello}" /> 64 <arg value="--name" /> 65 <arg value="${iuc.res.reshello}" /> 66 </exec> 67 <move file="${iuc.tmp}/${iuc.res.reshello}/${iuc.res.reshello}" todir="${iuc.dataoutdir}/" /> 68 <!-- make popmsg --> 69 <delete dir="${iuc.tmp}/${iuc.res.popmsg}" /> <!-- clean up --> 70 <exec executable="${iuc.bldicures}"> 71 <arg value="-v" /> 72 <arg value="--endian" /> 73 <arg value="big" /> 74 <arg value="--mode" /> 75 <arg value="files" /> 76 <arg value="--from" /> 77 <arg value="${iuc.res.popmsg.path}" /> 78 <arg value="--dest" /> 79 <arg value="${iuc.tmp}/${iuc.res.popmsg}" /> 80 <arg value="--name" /> 81 <arg value="${iuc.res.popmsg}" /> 82 </exec> 83 <move file="${iuc.tmp}/${iuc.res.popmsg}/${iuc.res.popmsg}" todir="${iuc.dataoutdir}/" /> 84 <delete dir="${iuc.tmp}" /> <!-- clean up --> 85 </target> 86</project> 87