1#!/bin/bash
2# Copyright (c) 2014 The Chromium Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6ICUROOT="$(dirname $0)/.."
7LINUX_SOURCE="${ICUROOT}/linux/icudtl_dat.S"
8MAC_SOURCE="${ICUROOT}/mac/icudtl_dat.S"
9
10cat > ${MAC_SOURCE} <<PREAMBLE
11.globl _icudt52_dat
12#ifdef U_HIDE_DATA_SYMBOL
13       .private_extern _icudt52_dat
14#endif
15       .data
16       .const
17       .align 4
18_icudt52_dat:
19PREAMBLE
20
21PREAMBLE_LENGTH=$(($(egrep -n '^icudt' ${LINUX_SOURCE} | cut -d : -f 1) + 1))
22tail -n +${PREAMBLE_LENGTH} ${LINUX_SOURCE} >> ${MAC_SOURCE}
23