forked from unicode-org/cldr-json
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
111 lines (99 loc) · 5.07 KB
/
build.xml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<project name="CLDR JSON Generation" default="all" basedir=".">
<target name="init">
<tstamp/>
<property name="cldr.jar" value="../../tools/java/cldr.jar"/>
<!-- parallelize by splitting between 5 processes. Could be better, could be worse. wfm. -->
<property name="localematch.0" value="[ed].*"/>
<property name="localematch.1" value="[sk].*"/>
<property name="localematch.2" value="[fm].*"/>
<property name="localematch.3" value="[an].*"/>
<property name="localematch.4" value="[icv].*"/>
<property name="localematch.5" value="[trg].*"/>
<property name="localematch.6" value="[bhu].*"/>
<property name="localematch.7" value="[lpz].*"/>
<property name="localematch.8" value="[^edicvsktrgfmbhuanlpz].*"/> <!-- everything else -->
</target>
<target name="build" depends="init" description="Build java/ (cldr-tools)">
<ant dir="../../tools/java" inheritAll="true" target="all"/>
</target>
<target name="all" depends="init,build,build-json" description="Build java/ and the JSON"/>
<target name="pall" depends="init,build,build-json-parallel" description="Build java/ and the JSON"/>
<target name="jar" depends="init" description="Create java/cldr.jar">
<ant dir="../../tools/java" inheritAll="true" target="jar"/>
</target>
<target name="clean" depends="init" description="Clean out JSON directories">
<delete>
<fileset dir=".." includes="**/bower.json"/>
<fileset dir=".." includes="**/package.json"/>
<fileset dir=".." includes="**/.bowerrc"/>
<fileset dir=".." includes="**/main/**/*.json"/>
<fileset dir=".." includes="**/segments/**/*.json"/>
<fileset dir=".." includes="**/supplemental/*.json"/>
<fileset dir=".." includes="**/rbnf/*.json"/>
</delete>
</target>
<target name="build-json" depends="build-json-main,build-json-supplemental,build-json-segments,build-json-rbnf"/>
<target name="build-json-parallel" depends="build-json-main-parallel,build-json-supplemental,build-json-segments,build-json-rbnf"/>
<target name="_buildjsonmain"> <!-- no depends - DO NOT CALL outside of build-json-main -->
<java fork="true" jar="${cldr.jar}">
<sysproperty key="CLDR_DIR" value="../.."/>
<sysproperty key="CLDR_GEN_DIR" value=".."/>
<arg value="ldml2json"/>
<arg value="-o"/> <arg value="false"/>
<arg value="-t"/> <arg value="main"/>
<arg value="-p"/> <arg value="true"/>
<arg value="-r"/> <arg value="true"/>
<arg value="-s"/> <arg value="contributed"/>
<arg value="-m"/> <arg value="${localeMatch}"/>
</java>
</target>
<target name="build-json-main-parallel" depends="init,jar">
<parallel threadsPerProcessor="1">
<antcall target="_buildjsonmain"><param name="localeMatch" value="${localematch.0}"/></antcall>
<antcall target="_buildjsonmain"><param name="localeMatch" value="${localematch.1}"/></antcall>
<antcall target="_buildjsonmain"><param name="localeMatch" value="${localematch.2}"/></antcall>
<antcall target="_buildjsonmain"><param name="localeMatch" value="${localematch.3}"/></antcall>
<antcall target="_buildjsonmain"><param name="localeMatch" value="${localematch.4}"/></antcall>
<antcall target="_buildjsonmain"><param name="localeMatch" value="${localematch.5}"/></antcall>
<antcall target="_buildjsonmain"><param name="localeMatch" value="${localematch.6}"/></antcall>
<antcall target="_buildjsonmain"><param name="localeMatch" value="${localematch.7}"/></antcall>
<antcall target="_buildjsonmain"><param name="localeMatch" value="${localematch.8}"/></antcall>
</parallel>
</target>
<target name="build-json-main" depends="init,jar">
<antcall target="_buildjsonmain"><param name="localeMatch" value="[a-z].*"/></antcall>
</target>
<target name="build-json-supplemental" depends="init,jar">
<java fork="true" jar="${cldr.jar}">
<sysproperty key="CLDR_DIR" value="../.."/>
<sysproperty key="CLDR_GEN_DIR" value=".."/>
<arg value="ldml2json"/>
<arg value="-o"/> <arg value="false"/>
<arg value="-p"/> <arg value="true"/>
<arg value="-s"/> <arg value="contributed"/>
<arg value="-t"/> <arg value="supplemental"/>
</java>
</target>
<target name="build-json-segments" depends="init,jar">
<java fork="true" jar="${cldr.jar}">
<sysproperty key="CLDR_DIR" value="../.."/>
<sysproperty key="CLDR_GEN_DIR" value=".."/>
<arg value="ldml2json"/>
<arg value="-o"/> <arg value="false"/>
<arg value="-t"/> <arg value="segments"/>
<arg value="-s"/> <arg value="contributed"/>
<arg value="-p"/> <arg value="true"/>
</java>
</target>
<target name="build-json-rbnf" depends="init,jar">
<java fork="true" jar="${cldr.jar}">
<sysproperty key="CLDR_DIR" value="../.."/>
<sysproperty key="CLDR_GEN_DIR" value=".."/>
<arg value="ldml2json"/>
<arg value="-o"/> <arg value="false"/>
<arg value="-t"/> <arg value="rbnf"/>
<arg value="-s"/> <arg value="contributed"/>
<arg value="-p"/> <arg value="true"/>
</java>
</target>
</project>