License & terms of use: http://www.unicode.org/copyright.html -->
code and data when building ICU data.
Eventually it will encompass:
* Building ICU data form CLDR data via cldr-to-icu.
* Building the CLDR libraries needed to support ICU data conversion.
* Copying CLDR test data for ICU regression tests.
It's not complete yet, so for now follow the instructions in:
icu4c/source/data/cldr-icu-readme.txt
-->
<project name="CLDR" basedir=".">
<target name="init-args">
<property environment="env"/>
with Ant, this is messier than it should be. All we are saying here is:
"Use the property if explicitly set, otherwise use the environment variable."
We cannot just set the property to the environment variable, since expansion
fails for non existent properties, and you are left with a literal value of
"${env.CLDR_DIR}". -->
<condition property="cldrDir" value="${env.CLDR_DIR}">
<isset property="env.CLDR_DIR"/>
</condition>
<fail unless="cldrDir"
message="Set the CLDR_DIR environment variable (or cldrDir property) to the top level CLDR source directory (containing 'common')."/>
<property name="testDataDir4C" value="${basedir}/../../icu4c/source/test/testdata/cldr"/>
<property name="testDataDir4J" value="${basedir}/../../icu4j/main/core/src/test/resources/com/ibm/icu/dev/data/cldr"/>
</target>
contents to prevent inconsistent state. -->
<target name="copy-cldr-testdata" depends="init-args, clean-cldr-testdata">
<fileset id="cldrTestData" dir="${cldrDir}/common/testData">
<include name="localeIdentifiers/**"/>
<include name="personNameTest/**"/>
<include name="units/**"/>
</fileset>
<copy todir="${testDataDir4C}">
<fileset refid="cldrTestData"/>
</copy>
<copy todir="${testDataDir4J}">
<fileset refid="cldrTestData"/>
</copy>
<pathconvert property="personNameTestDirContents" pathsep="${line.separator}">
<fileset dir="${cldrDir}/common/testData/personNameTest" excludes="_*" includes="**" />
<map from="${cldrDir}/common/testData/personNameTest/" to="" />
</pathconvert>
<echo message="Creating catalog.txt file" />
<copy file="${testDataDir4C}/personNameTest/_header.txt" tofile="${testDataDir4C}/personNameTest/catalog.txt" />
<echo message="${personNameTestDirContents}" file="${testDataDir4C}/personNameTest/catalog.txt" append="true" />
<copy file="${testDataDir4J}/personNameTest/_header.txt" tofile="${testDataDir4J}/personNameTest/catalog.txt" />
<echo message="${personNameTestDirContents}" file="${testDataDir4J}/personNameTest/catalog.txt" append="true" />
</target>
<target name="clean-cldr-testdata" depends="init-args">
<delete dir="${testDataDir4C}"/>
<delete dir="${testDataDir4J}"/>
</target>
through any specified arguments for controlling the build. If you need more control when
building ICU data (such as incrementally building parts of the data), you should use the
build-icu-data.xml file directly. -->
<target name="build-icu-data">
<ant dir="cldr-to-icu" antfile="build-icu-data.xml" target="all" inheritAll="true"/>
</target>
<target name="clean-icu-data">
<ant dir="cldr-to-icu" antfile="build-icu-data.xml" target="clean" inheritAll="true"/>
</target>
<target name="install-cldr-libs" depends="init-args">
<exec dir="lib" executable="install-cldr-jars.sh" resolveexecutable="true" failonerror="true">
<arg line="${cldrDir}"/>
</exec>
</target>
</project>