blob: a7efc0675b115c033b6a8048f1082f46ee295da9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
<!DOCTYPE project [
<!ENTITY icu-config SYSTEM "./icu-config.xml">
<!ENTITY icu-locale-deprecates SYSTEM "./icu-locale-deprecates.xml">
<!ENTITY icu-coll-deprecates SYSTEM "./icu-coll-deprecates.xml">
<!ENTITY icu-rbnf-deprecates SYSTEM "./icu-rbnf-deprecates.xml">
]>
<!--
/*
* Copyright (C) 2016 and later: Unicode, Inc. and others.
* License & terms of use: http://www.unicode.org/copyright.html
*******************************************************************************
* Copyright (C) 2005-2015, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
-->
<project name="icu-build" default="all" basedir=".">
<target name="init">
<tstamp/>
<!-- Load environment variables -->
<property environment="env"/>
<!-- Ant won't set properties that have already been set, so environment variables that have been set before won't be clobbered. -->
<property name="env.ICU4C_DIR" location="../.."/>
<condition property="is.cldr.dir.set" >
<isset property="env.CLDR_DIR" />
</condition >
<fail unless="is.cldr.dir.set" message="Please set the CLDR_DIR environment variable to the top level CLDR source dir (containing 'common')."/>
<available property="cldrtools.dir" value="${env.CLDR_DIR}/cldr-tools" file="${env.CLDR_DIR}/cldr-tools" type="dir"/>
<available property="cldrtools.dir" value="${env.CLDR_DIR}/tools" file="${env.CLDR_DIR}/tools" type="dir"/>
<fail unless="cldrtools.dir" message="Please make sure that the CLDR tools directory is checked out into CLDR_DIR"/>
<available property="env.CLDR_CLASSES" value="${cldrtools.dir}/cldr-code/target/classes" file="${cldrtools.dir}/cldr-code/target/classes" type="dir"/>
<available property="cldrtools.jar" value="${cldrtools.dir}/cldr-code/target/cldr-code.jar" file="${cldrtools.dir}/cldr-code/target/cldr-code.jar" type="file"/>
<condition property="is.cldr.classes.set">
<or>
<isset property="env.CLDR_CLASSES" />
<isset property="cldrtools.jar" />
</or>
</condition>
<fail unless="is.cldr.classes.set" message="CLDR classes not found in ${cldrtools.dir}/cldr-code/target/classes. Please either set the CLDR_CLASSES environment variable or build cldr-code.jar."/>
<property name="env.CLDR_TMP_DIR" location="${env.CLDR_DIR}/../cldr-aux" /> <!-- Hack: see CLDRPaths -->
<property name="cldr.prod.dir" location="${env.CLDR_TMP_DIR}/production/" />
<echo message="java home: ${java.home}"/>
<echo message="java version: ${java.version}"/>
<echo message="ant java version: ${ant.java.version}"/>
<echo message="${ant.version}"/>
<echo message="cldr tools dir: ${cldrtools.dir}"/>
<echo message="cldr tools jar: ${cldrtools.jar}"/>
<echo message="cldr tools classes: ${env.CLDR_CLASSES}"/>
<echo message="CLDR_TMP_DIR: ${env.CLDR_TMP_DIR} "/>
<echo message="cldr.prod.dir (production data): ${cldr.prod.dir}"/>
</target>
<target name="setup" depends="init">
<mkdir dir="${env.CLDR_TMP_DIR}"/> <!-- make sure parent dir exists -->
<condition property="cldrprod.exists">
<available file="${cldr.prod.dir}/common" type="dir"/>
</condition>
</target>
<target name="cleanprod" depends="init, setup" if="cldrprod.exists">
<delete dir="${cldr.prod.dir}/common" />
<delete dir="${cldr.prod.dir}/keyboards" />
</target>
<target name="proddata" depends="init,setup" unless="cldrprod.exists">
<echo message="Rebuilding ${cldr.prod.dir} - takes a while!"/>
<!-- setup prod data -->
<java fork="true" jar="${cldrtools.jar}">
<arg value="org.unicode.cldr.tool.GenerateProductionData" /> <!-- change to short alias 'proddata' or similar when annotated -->
<arg value="-v" />
<!-- TODO: for now, we just let the default source/target paths used.
could set '-s' / '-d' for explicit source/dest -->
</java>
</target>
</project>
|