platform_bionic/libc/zoneinfo/Android.mk
Neil Fuller 108279e9e5 Addition of a new system file for time zone data
This file is to replace the time_zones_by_country.xml
file from frameworks/base/core/res/res/xml/

This new file is intended to be updated outside of
an OTA, unlike time_zones_by_country.xml.

The tzlookup.xml file is read by code in libcore, not
frameworks/base.

The format of the file is slightly different from
time_zones_by_country.xml but the information is the
same as the current version. It was generated using
a sed transform and manual coallescing of the
<country> elements / comments:

sed 's/<timezones>$/<timezones>\n  <countryzones>/' frameworks/base/core/res/res/xml/time_zones_by_country.xml \
    | sed 's/<\/timezones>/  <\/countryzones>\n<\/timezones>/' \
    | sed 's/<timezone\( code=\"..\">\)/<country\1\n      <id>/g' \
    | sed 's/<\/timezone>/<\/id>\n    <\/country>/g'

The time_zones_by_country.xml file will be deleted
in a follow up change when the new code is wired into
the code that uses this data.

Test: See associated libcore change that will ensure the file
      is kept in sync with tzdata when applying IANA rules
      changes.
Bug: 25338903
Change-Id: I8912307bf6a41750ac06ffce9143e8055ea4e7c5
2017-03-31 15:35:14 +01:00

46 lines
1.4 KiB
Makefile

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := tzdata
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_SRC_FILES := $(LOCAL_MODULE)
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT)/usr/share/zoneinfo
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := tzlookup.xml
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_SRC_FILES := $(LOCAL_MODULE)
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT)/usr/share/zoneinfo
include $(BUILD_PREBUILT)
# The host build doesn't use bionic, but it does use bionic's zoneinfo data
ifeq ($(WITH_HOST_DALVIK),true)
include $(CLEAR_VARS)
LOCAL_MODULE := tzdata-host
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_IS_HOST_MODULE := true
LOCAL_SRC_FILES := tzdata
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_STEM := $(LOCAL_SRC_FILES)
LOCAL_MODULE_PATH := $(HOST_OUT)/usr/share/zoneinfo
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := tzlookup.xml-host
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_IS_HOST_MODULE := true
LOCAL_SRC_FILES := tzlookup.xml
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_STEM := $(LOCAL_SRC_FILES)
LOCAL_MODULE_PATH := $(HOST_OUT)/usr/share/zoneinfo
include $(BUILD_PREBUILT)
endif