8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 22:43:03 +01:00
firebird-mirror/builds/posix/vers.sh.in

97 lines
1.7 KiB
Bash
Raw Normal View History

#!/bin/sh
#
# The contents of this file are subject to the Initial
# Developer's Public License Version 1.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.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
#
# Software distributed under the License is distributed AS IS,
# WITHOUT WARRANTY OF ANY KIND, either express or implied.
# See the License for the specific language governing rights
# and limitations under the License.
#
# The Original Code was created by Alex Peshkov
# for the Firebird Open Source RDBMS project.
#
# Copyright (c) 2010 Alex Peshkov <peshkoff@mail.ru>
# and all contributors signed below.
#
# All Rights Reserved.
# Contributor(s): ______________________________________.
#
platform_aix() {
echo '#!'
for i in `grep -v '#' ${1}`
do
echo -e "\t$i"
done
}
platform_darwin() {
for i in `grep -v '#' ${1}`
do
# Client export list must not contain server_main
if test "${2}" = "client"
then
if test "$i" = "server_main"
then
i=""
fi
fi
if test -n "$i"
then
echo -e "\t_$i"
fi
done
}
platform_hpux() {
for i in `grep -v '#' ${1}`
do
echo "+e $i"
done
}
platform_linux() {
echo '{'
echo 'global:'
for i in `grep -v '#' ${1}`
do
2010-03-14 16:58:13 +01:00
echo "\t$i;"
done
echo 'local:'
2010-03-14 16:58:13 +01:00
echo '\t*;'
echo '};'
}
FILE=${1}
if test -z "$FILE"
then
echo "Usage: vers.sh export-symbol-file-name {client}"
exit 1
fi
FROM="../builds/posix/$FILE"
if test ! -f "$FROM"
then
echo "vers.sh: missing $FROM"
exit 1
fi
CLIENT=${2}
if test -z "$CLIENT"
then
TO="$FILE"
else
TO="$CLIENT.$FILE"
fi
platform_@EXPORT_SYMBOLS_STYLE@ $FROM ${2} >$TO