Neil Fuller | 04b2285 | 2015-10-26 16:21:44 +0000 | [diff] [blame^] | 1 | # 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 | |
| 17 | set -e |
| 18 | |
| 19 | if [[ -z ${ANDROID_BUILD_TOP} ]]; then |
| 20 | echo ANDROID_BUILD_TOP not set |
| 21 | exit 1 |
| 22 | fi |
| 23 | |
| 24 | # source envsetup.sh because functions we use like mm are not exported. |
| 25 | source ${ANDROID_BUILD_TOP}/build/envsetup.sh |
| 26 | |
| 27 | # Build the srcgen tools. |
| 28 | cd ${ANDROID_BUILD_TOP}/external/icu/tools/srcgen/currysrc |
| 29 | mm -j32 |
| 30 | cd ${ANDROID_BUILD_TOP}/external/icu/tools/srcgen |
| 31 | mm -j32 |
| 32 | |
| 33 | ANDROID_ICU4J_DIR=${ANDROID_BUILD_TOP}/external/icu/android_icu4j |
| 34 | |
| 35 | # Generate the source code needed by Android. |
| 36 | CLASSPATH=${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 |
| 37 | INPUT_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 | " |