pylucene 3.5.0-3
[pylucene.git] / lucene-java-3.5.0 / lucene / contrib / icu / build.xml
1 <?xml version="1.0"?>
2
3 <!--
4     Licensed to the Apache Software Foundation (ASF) under one or more
5     contributor license agreements.  See the NOTICE file distributed with
6     this work for additional information regarding copyright ownership.
7     The ASF licenses this file to You under the Apache License, Version 2.0
8     the "License"); you may not use this file except in compliance with
9     the License.  You may obtain a copy of the License at
10  
11         http://www.apache.org/licenses/LICENSE-2.0
12  
13     Unless required by applicable law or agreed to in writing, software
14     distributed under the License is distributed on an "AS IS" BASIS,
15     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16     See the License for the specific language governing permissions and
17     limitations under the License.
18  -->
19
20 <project name="icu" default="default">
21
22   <description>
23         Provides integration with ICU (International Components for Unicode) for
24         stronger Unicode and internationalization support. 
25   </description>
26
27
28   <path id="additional.dependencies">
29     <fileset dir="lib" includes="icu4j-*.jar"/>
30   </path>
31
32   <pathconvert property="project.classpath"
33                targetos="unix"
34                refid="additional.dependencies"
35   />
36
37   <import file="../contrib-build.xml"/>
38
39   <property name="gennorm2.src.dir" value="src/data/utr30"/>
40   <property name="gennorm2.src.files" 
41         value="nfkc.txt nfkc_cf.txt BasicFoldings.txt DiacriticFolding.txt DingbatFolding.txt HanRadicalFolding.txt NativeDigitFolding.txt"/>
42   <property name="gennorm2.tmp" value="${build.dir}/gennorm2/utr30.tmp"/>
43   <property name="gennorm2.dst" value="src/resources/org/apache/lucene/analysis/icu/utr30.nrm"/>
44   <target name="gennorm2">
45     <echo>Note that the gennorm2 and icupkg tools must be on your PATH. These tools
46 are part of the ICU4C package. See http://site.icu-project.org/ </echo>
47     <mkdir dir="${build.dir}/gennorm2"/>
48     <exec executable="gennorm2" failonerror="true">
49       <arg value="-v"/>
50       <arg value="-s"/>
51       <arg value="${gennorm2.src.dir}"/>
52       <arg line="${gennorm2.src.files}"/>
53       <arg value="-o"/>
54       <arg value="${gennorm2.tmp}"/>
55     </exec>
56     <!-- now convert binary file to big-endian -->
57     <exec executable="icupkg" failonerror="true">
58       <arg value="-tb"/>
59       <arg value="${gennorm2.tmp}"/>
60       <arg value="${gennorm2.dst}"/>
61     </exec>
62     <delete file="${gennorm2.tmp}"/>
63   </target>
64   
65   <property name="rbbi.src.dir" location="src/data/uax29"/>
66   <property name="rbbi.dst.dir" location="src/resources/org/apache/lucene/analysis/icu/segmentation"/>
67                 
68   <target name="genrbbi" depends="compile-tools">
69     <mkdir dir="${rbbi.dst.dir}"/>
70     <java
71       classname="org.apache.lucene.analysis.icu.RBBIRuleCompiler"
72       dir="."
73       fork="true"
74       failonerror="true">
75       <classpath>
76         <path refid="additional.dependencies"/>
77         <pathelement location="${build.dir}/classes/tools"/>
78       </classpath>
79       <arg value="${rbbi.src.dir}"/>
80       <arg value="${rbbi.dst.dir}"/>
81     </java>
82   </target>
83
84   <property name="uax29.supp.macros.output.file" 
85             location="../../src/java/org/apache/lucene/analysis/standard/SUPPLEMENTARY.jflex-macro"/>
86
87   <target name="gen-uax29-supp-macros" depends="compile-tools">
88     <java
89       classname="org.apache.lucene.analysis.icu.GenerateJFlexSupplementaryMacros"
90       dir="."
91       fork="true"
92       failonerror="true"
93       output="${uax29.supp.macros.output.file}">
94       <classpath>
95         <path refid="additional.dependencies"/>
96         <pathelement location="${build.dir}/classes/tools"/>
97       </classpath>
98     </java>
99   </target>
100   
101   <target name="compile-tools" depends="common.compile-tools">
102     <compile
103       srcdir="src/tools/java"
104       destdir="${build.dir}/classes/tools">
105       <classpath refid="classpath"/>
106     </compile>
107   </target>
108 </project>