aboutsummaryrefslogtreecommitdiff
path: root/stubdata
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2010-07-13 19:03:51 -0700
committerJoe Onorato <joeo@android.com>2010-07-15 11:04:33 -0700
commitd60a22e7a4de8de9c2f4f577b4b41df82002a3b8 (patch)
treeff5360b0c35a55fc469b0ef08d90f5761063fa51 /stubdata
parent48b4965f21b876425372e873214bdc2496d02c3e (diff)
downloadicu4c-d60a22e7a4de8de9c2f4f577b4b41df82002a3b8.tar.gz
Make ICU use an independent data file instead ofbuilding
it directly into a .so. This makes builds after installclean faster, since it doesn't need to be rebuilt, and it makes debugging ICU easier as well. Change-Id: I54b100fe2642189dc8d2042ebacab0f6b3ae4fac
Diffstat (limited to 'stubdata')
-rw-r--r--stubdata/Android.mk99
-rw-r--r--stubdata/IcuData.mk62
2 files changed, 2 insertions, 159 deletions
diff --git a/stubdata/Android.mk b/stubdata/Android.mk
index 6402cd0c..96629bb6 100644
--- a/stubdata/Android.mk
+++ b/stubdata/Android.mk
@@ -71,102 +71,7 @@ config := $(word 1, \
$(if $(findstring nl,$(PRODUCT_LOCALES)),default) \
us)
-icu_var_name := icudt42_dat
+root := icudt42l
+PRODUCT_COPY_FILES += $(LOCAL_PATH)/$(root)-$(config).dat:/system/usr/icu/$(root).dat
-#
-# Japanese (for target)
-#
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libicudata-jp
-
-required_config := us-japan
-data_file_name := icudt42l-us-japan.dat
-output_file_name := icu_data_jp.S
-
-include $(LOCAL_PATH)/IcuData.mk
-include $(BUILD_SHARED_LIBRARY)
-
-
-#
-# Large (for target)
-#
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libicudata-large
-
-required_config := large
-data_file_name := icudt42l-large.dat
-output_file_name := icu_data_large.S
-
-include $(LOCAL_PATH)/IcuData.mk
-include $(BUILD_SHARED_LIBRARY)
-
-
-#
-# Euro (for target)
-#
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libicudata-eu
-
-required_config := us-euro
-data_file_name := icudt42l-us-euro.dat
-output_file_name := icu_data_eu.S
-
-include $(LOCAL_PATH)/IcuData.mk
-include $(BUILD_SHARED_LIBRARY)
-
-
-#
-# Default (for target)
-#
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libicudata-default
-
-required_config := default
-data_file_name := icudt42l-default.dat
-output_file_name := icu_data_default.S
-
-include $(LOCAL_PATH)/IcuData.mk
-include $(BUILD_SHARED_LIBRARY)
-
-
-#
-# US (for target)
-#
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libicudata-us
-
-required_config := us
-data_file_name := icudt42l-us.dat
-output_file_name := icu_data_us.S
-
-include $(LOCAL_PATH)/IcuData.mk
-include $(BUILD_SHARED_LIBRARY)
-
-
-#
-# Large (for host). This is the only config we support on the host,
-# and you can see the "config" variable being set below for that
-# reason.
-#
-
-ifeq ($(WITH_HOST_DALVIK),true)
-
- include $(CLEAR_VARS)
- LOCAL_MODULE := libicudata-large
-
- config := large
- required_config := large
- data_file_name := icudt42l-large.dat
- output_file_name := icu_data_large.S
-
- include $(LOCAL_PATH)/IcuData.mk
- include $(BUILD_HOST_SHARED_LIBRARY)
-
-endif
diff --git a/stubdata/IcuData.mk b/stubdata/IcuData.mk
deleted file mode 100644
index 41e57d6b..00000000
--- a/stubdata/IcuData.mk
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright (C) 2008 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# Common definitions used for building ICU data files.
-#
-# Prior to including this file, the following variables should be
-# set for each variant:
-#
-# LOCAL_MODULE -- set (as usual) to name the module being built
-# data_file_name -- the name of the prebuilt data file to use
-# output_file_name -- the name of the output source file
-# required_config -- the name of the configuration that requires this data
-#
-# And these variables need to be set before the first variant is defined.
-# This is done in the preamble of the Android.mk file in this directory:
-#
-# config -- current configuration
-# icu_var_name -- name of the symbol that needs to be defined in the
-# data file
-#
-
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-
-# This sets LOCAL_PRELINK_MODULE := false because the prelink map
-# requires a unique address for each shared library, but all the
-# variants of libicudata.so actually need to be mapped at the same
-# address so they can be interchangable.
-LOCAL_PRELINK_MODULE := false
-
-ifeq ($(config),$(required_config))
- LOCAL_MODULE_STEM := libicudata
- LOCAL_MODULE_TAGS := user
-else
- LOCAL_MODULE_TAGS := optional
-endif
-
-intermediates := $(call local-intermediates-dir)
-icu_data_file := $(LOCAL_PATH)/$(data_file_name)
-
-asm_file := $(intermediates)/$(output_file_name)
-LOCAL_GENERATED_SOURCES += $(asm_file)
-
-$(asm_file): PRIVATE_VAR_NAME := $(icu_var_name)
-$(asm_file): $(icu_data_file) $(ICUDATA)
- @echo icudata: $@
- $(hide) mkdir -p $(dir $@)
- $(hide) $(ICUDATA) $(PRIVATE_VAR_NAME) < $< > $@
-
-LOCAL_CFLAGS += -D_REENTRANT -DPIC -fPIC
-LOCAL_CFLAGS += -O3 -nodefaultlibs -nostdlib