blob: b7a214e0e41c2f59555a38a7f5bb24451d879171 [file] [log] [blame]
Neil Fuller04b22852015-10-26 16:21:44 +00001# Copyright (C) 2015 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# Common variables and actions for inclusion in srcgen scripts.
16
17set -e
18
19if [[ -z ${ANDROID_BUILD_TOP} ]]; then
20 echo ANDROID_BUILD_TOP not set
21 exit 1
22fi
23
24# source envsetup.sh because functions we use like mm are not exported.
25source ${ANDROID_BUILD_TOP}/build/envsetup.sh
26
27# Build the srcgen tools.
28cd ${ANDROID_BUILD_TOP}/external/icu/tools/srcgen/currysrc
29mm -j32
30cd ${ANDROID_BUILD_TOP}/external/icu/tools/srcgen
31mm -j32
32
33ANDROID_ICU4J_DIR=${ANDROID_BUILD_TOP}/external/icu/android_icu4j
34
35# Generate the source code needed by Android.
36CLASSPATH=${ANDROID_BUILD_TOP}/out/host/common/obj/JAVA_LIBRARIES/currysrc_intermediates/javalib.jar:${ANDROID_BUILD_TOP}/out/host/common/obj/JAVA_LIBRARIES/android_icu4j_srcgen_intermediates/javalib.jar
37INPUT_DIRS="\
38 ${ANDROID_BUILD_TOP}/external/icu/icu4j/main/classes/collate/src \
39 ${ANDROID_BUILD_TOP}/external/icu/icu4j/main/classes/core/src \
40 ${ANDROID_BUILD_TOP}/external/icu/icu4j/main/classes/currdata/src \
41 ${ANDROID_BUILD_TOP}/external/icu/icu4j/main/classes/langdata/src \
42 ${ANDROID_BUILD_TOP}/external/icu/icu4j/main/classes/regiondata/src \
43 ${ANDROID_BUILD_TOP}/external/icu/icu4j/main/classes/translit/src \
44 "