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