summaryrefslogtreecommitdiff
path: root/VC++Files/prepare
blob: d106e277e453a1493ad634849c0b02c8e1905dd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/bin/sh
# Copyright (C) 2002, 2005 MySQL AB
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

if [ -f prepare_done ]
then
    exit
fi

cd ..
SRCDIR=`pwd`

(
find $SRCDIR -name *.dsw -and -not -path \*SCCS\* -print
find $SRCDIR -name *.dsp -and -not -path \*SCCS\* -print
)|(
while read v 
do
    sed 's/$'"/`echo -e \\\r`/" $v > $v.tmp
    rm $v
    mv $v.tmp $v
done
)

ln -s $SRCDIR/include $SRCDIR/VC++Files/include

link_dir_files()
{
    for arg do

    cd $SRCDIR/$arg/
    (
     ls -A1|grep \\.[ch]$
     ls -A1|grep \\.ih$
     ls -A1|grep \\.asm$
    )|(
    while read v 
    do
	ln -s $SRCDIR/$arg/$v $SRCDIR/VC++Files/$arg/$v
    done
    )

    cd $SRCDIR/$arg/
    (ls -A1|grep \\.cc$|sed 's/.cc$//g')|(
    while read v 
    do
	ln -s $SRCDIR/$arg/$v.cc $SRCDIR/VC++Files/$arg/$v.cpp
    done
    )
    
    done
}

link_dir_dirs()
{
    for arg do
    
    cd $SRCDIR/$arg/
    (
      ls -l |grep "^d"|awk '{print($9)}' -
    )|(
    while read v 
    do
	ln -s $SRCDIR/$arg/$v $SRCDIR/VC++Files/$arg/
    done
    )
    
    done
}

link_dir_files 'heap'
link_dir_files 'mysys'
link_dir_files 'zlib'
link_dir_files 'regex'
link_dir_files 'strings'
link_dir_files 'dbug'
link_dir_files 'vio'
link_dir_files 'client'
link_dir_files 'libmysql'
link_dir_files 'extra'
link_dir_files 'myisam'
link_dir_files 'myisammrg'
link_dir_files 'innobase'
link_dir_files 'bdb'
link_dir_files 'sql'
link_dir_files 'bdb/build_win32'
link_dir_files 'libmysqld'

link_dir_dirs 'bdb'
link_dir_dirs 'innobase'

ln -s $SRCDIR/myisam/myisampack.c $SRCDIR/VC++Files/myisampack/
ln -s $SRCDIR/client/mysqlbinlog.cc $SRCDIR/VC++Files/mysqlbinlog/mysqlbinlog.cpp

echo '/* added for win : */' >> $SRCDIR/config.h
echo '#undef HAVE_SCHED_H' >> $SRCDIR/config.h
echo '#USE_QUERY_CACHE_INTEGRITY_CHECK 1' >> $SRCDIR/config.h

echo '/* added for win : */' >> $SRCDIR/innobase/ib_config.h
echo '#undef HAVE_SCHED_H' >> $SRCDIR/innobase/ib_config.h

cd $SRCDIR/VC++Files
echo '1' > prepare_done