1#!/bin/bash 2# 3# Copyright (C) 2022 The Android Open Source Project 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); 6# you may not use this file except in compliance with the License. 7# You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16 17# Set up prog to be the path of this script, including following 18# symlinks, and set up progdir to be the fully-qualified pathname of 19# its directory. Switch the current directory to progdir for the 20# remainder of the script. 21set -e 22 23if [[ -z ${ANDROID_BUILD_TOP} ]]; then 24 echo ANDROID_BUILD_TOP not set 25 exit 1 26fi 27 28OJLUNI_JAVA_ROOT=${ANDROID_BUILD_TOP}/libcore/ojluni/src/main/java 29 30AWK=awk SCRIPTS=${ANDROID_BUILD_TOP}/libcore/ojluni/src/tools/scripts/ \ 31${ANDROID_BUILD_TOP}/libcore/ojluni/src/tools/scripts/genExceptions.sh \ 32 ${OJLUNI_JAVA_ROOT}/java/nio/charset/exceptions \ 33 ${OJLUNI_JAVA_ROOT}/java/nio/charset 34 35MAKE_ROOT=${ANDROID_BUILD_TOP}/libcore/ojluni/src/tools/make 36gmake -C ${MAKE_ROOT} all 37mv ${MAKE_ROOT}/out/gensrc/java.base/java/nio/charset/CharsetEncoder.java \ 38 ${OJLUNI_JAVA_ROOT}/java/nio/charset/CharsetEncoder.java 39mv ${MAKE_ROOT}/out/gensrc/java.base/java/nio/charset/CharsetDecoder.java \ 40 ${OJLUNI_JAVA_ROOT}/java/nio/charset/CharsetDecoder.java 41 42