1#!/bin/sh 2# 3# Copyright (C) 2017 and later: Unicode, Inc. and others. 4# License & terms of use: http://www.unicode.org/copyright.html 5# 6# Copyright (C) 2010-2012 IBM Corporation and Others, All Rights Reserved. 7 8# $@ 9OUT=$1 10shift 11# $* 12VER=$1 13shift 14 15TINY=`./icu2symver.sh $VER` 16OLDSYM=`./icu2symver.sh --pre44sym $VER` 17 18echo "$0: Building ${OUT} for ${TINY} ------- " >&2 19echo "oldsym = ${OLDSYM}" 20#set -x 21URENAME=${SRC}/${VER}/${SOURCE}/common/unicode/urename.h 22( 23 cat ${GLUE}/gluren-top.h 24 echo "/* Generated from ${URENAME} by ${0} */" 25 echo "#define GLUREN_VER" ${TINY} 26 echo "#define GLUREN_TINY" ${TINY} 27 echo 28 echo '/* old style (<4.4)*/' 29 grep "^#define.*${OLDSYM}$" ${URENAME} | fgrep -v '*' | sed -e "s@^#define \([^ ]*\) \([^ ]*\)@#define OICU_\1 \2@" 30 echo '/* new style (4.4+) */' 31 fgrep " U_ICU_ENTRY_POINT_RENAME(" ${URENAME} | sed -e "s@^#define \([^ ]*\) .*@#define OICU_\1 \1_${TINY}@" 32 cat ${GLUE}/gluren-bottom.h 33) | 34 cat > ${OUT} 35# tee ${OUT} 36 37