~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to storage/ndb/config/win-libraries

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
dst=$1
 
4
shift
 
5
 
 
6
type=$1
 
7
shift
 
8
 
 
9
add_lib(){
 
10
    echo `dirname $2`/$1/`basename $2 | sed "s/\.[l]*a/$3.lib/g"`
 
11
}
 
12
 
 
13
out_rel=
 
14
out_deb=
 
15
out_tls_rel=
 
16
out_tls_deb=
 
17
for i in $*
 
18
do
 
19
# mysql VC++ project files have for some unknown reason
 
20
# choosen NOT to put libdbug.lib in $(topdir)./dbug but rather in $(topdir)
 
21
# the same goes for mysys and strings
 
22
  lib=$i
 
23
  case $i in
 
24
  *libdbug.a | *libmysys.a | *libmystrings.a) 
 
25
  lib=`echo $i | sed s'!dbug\/lib!!' | sed 's!mysys\/lib!!' | sed 's!strings\/libmy!!'`
 
26
  echo "Changing from $i to $lib"
 
27
  ;;
 
28
  esac
 
29
 
 
30
  if [ `echo $i | grep -c gcc` -eq 0 ]
 
31
      then
 
32
      out_rel="${out_rel} `add_lib lib_release $lib`"
 
33
      out_deb="${out_deb} `add_lib lib_debug $lib`"
 
34
      out_tls_rel="${out_tls_rel} `add_lib lib_release $lib _tls`"
 
35
      out_tls_deb="${out_tls_deb} `add_lib lib_debug $lib _tls`"
 
36
  fi
 
37
done
 
38
 
 
39
fix(){
 
40
    echo "# ADD BASE ${type}32 $*\n# ADD ${type}32 $*\n"
 
41
}
 
42
 
 
43
if [ "$out_rel" ]
 
44
then
 
45
    out_rel=`fix $out_rel`
 
46
    out_deb=`fix $out_deb`
 
47
    out_tls_rel=`fix $out_tls_rel`
 
48
    out_tls_deb=`fix $out_tls_deb`
 
49
fi
 
50
 
 
51
sed -e "s!@release_libs@!$out_rel!g" \
 
52
    -e "s!@debug_libs@!$out_deb!g" \
 
53
    -e "s!@tls_release_libs@!$out_tls_rel!g" \
 
54
    -e "s!@tls_debug_libs@!$out_tls_deb!g" \
 
55
 $dst > !tmp!$dst.$$
 
56
mv !tmp!$dst.$$ $dst