summaryrefslogtreecommitdiff
path: root/VC++Files/prepare
blob: f68d0676fc9f6c3535db2ea99b6a24ff0d03cb0b (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
#!/bin/sh

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