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