mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 23:34:34 +01:00
43 lines
875 B
Text
43 lines
875 B
Text
|
#!/bin/sh
|
||
|
|
||
|
dst=$1
|
||
|
shift
|
||
|
|
||
|
add_lib(){
|
||
|
echo `dirname $2`/$1/`basename $2 | sed "s/\.[l]*a/$3.lib/g"`
|
||
|
}
|
||
|
|
||
|
out_rel=
|
||
|
out_deb=
|
||
|
out_tls_rel=
|
||
|
out_tls_deb=
|
||
|
for i in $*
|
||
|
do
|
||
|
if [ `echo $i | grep -c gcc` -eq 0 ]
|
||
|
then
|
||
|
out_rel="${out_rel} `add_lib lib_release $i`"
|
||
|
out_deb="${out_deb} `add_lib lib_debug $i`"
|
||
|
out_tls_rel="${out_tls_rel} `add_lib lib_release $i _tls`"
|
||
|
out_tls_deb="${out_tls_deb} `add_lib lib_debug $i _tls`"
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
fix(){
|
||
|
echo "# ADD BASE LIB32 $*\n# ADD LIB32 $*\n"
|
||
|
}
|
||
|
|
||
|
if [ "$out_rel" ]
|
||
|
then
|
||
|
out_rel=`fix $out_rel`
|
||
|
out_deb=`fix $out_deb`
|
||
|
out_tls_rel=`fix $out_tls_rel`
|
||
|
out_tls_deb=`fix $out_tls_deb`
|
||
|
fi
|
||
|
|
||
|
sed -e "s!@release_libs@!$out_rel!g" \
|
||
|
-e "s!@debug_libs@!$out_deb!g" \
|
||
|
-e "s!@tls_release_libs@!$out_tls_rel!g" \
|
||
|
-e "s!@tls_debug_libs@!$out_tls_deb!g" \
|
||
|
$dst > !tmp!$dst.$$
|
||
|
mv !tmp!$dst.$$ $dst
|