source: trunk/third/rpm/db/dist/s_win32 @ 19079

Revision 19079, 2.9 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r19078, which included commits to RCS files with non-trunk default branches.
  • Property svn:executable set to *
Line 
1#!/bin/sh -
2#       Id: s_win32,v 1.25 2002/05/20 19:18:14 bostic Exp
3#
4# Build Windows/32 include files.
5
6msgc="/* DO NOT EDIT: automatically built by dist/s_win32. */"
7msgw="; DO NOT EDIT: automatically built by dist/s_win32."
8
9. RELEASE
10
11s=/tmp/__db_a$$
12t=/tmp/__db_b$$
13rm -f $s $t
14
15trap 'rm -f $s $t ; exit 1' 1 2 3 13 15
16
17# Build the Win32 automatically generated files.
18f=../build_win32/db.h
19cat <<ENDOFSEDTEXT > $s
20s/@u_int8_decl@/typedef unsigned char u_int8_t;/
21s/@int16_decl@/typedef short int16_t;/
22s/@u_int16_decl@/typedef unsigned short u_int16_t;/
23s/@int32_decl@/typedef int int32_t;/
24s/@u_int32_decl@/typedef unsigned int u_int32_t;/
25/@u_char_decl@/{
26        i\\
27#if !defined(_WINSOCKAPI_)
28        s/@u_char_decl@/typedef unsigned char u_char;/
29}
30s/@u_short_decl@/typedef unsigned short u_short;/
31s/@u_int_decl@/typedef unsigned int u_int;/
32/@u_long_decl@/{
33        s/@u_long_decl@/typedef unsigned long u_long;/
34        a\\
35#endif
36}
37/@ssize_t_decl@/{
38        i\\
39#if defined(_WIN64)\\
40typedef __int64 ssize_t;\\
41#else\\
42typedef int ssize_t;\\
43#endif
44        d
45}
46s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/
47s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/
48s/@DB_VERSION_PATCH@/$DB_VERSION_PATCH/
49s/@DB_VERSION_STRING@/"$DB_VERSION_STRING"/
50s/@DB_VERSION_UNIQUE_NAME@//
51ENDOFSEDTEXT
52(echo "$msgc" &&
53    sed -f $s ../dbinc/db.in &&
54    cat ../dbinc_auto/rpc_defs.in &&
55    cat ../dbinc_auto/ext_prot.in) > $t
56cmp $t $f > /dev/null 2>&1 ||
57    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
58
59f=../build_win32/db_cxx.h
60cat <<ENDOFSEDTEXT > $s
61s/@cxx_have_stdheaders@/#define HAVE_CXX_STDHEADERS 1/
62ENDOFSEDTEXT
63(echo "$msgc" && sed -f $s ../dbinc/db_cxx.in) > $t
64cmp $t $f > /dev/null 2>&1 ||
65    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
66
67f=../build_win32/db_int.h
68cat <<ENDOFSEDTEXT > $s
69s/\(PATH_SEPARATOR[^"]*"\)\/"/\1\\\\\\\\\\/:\"/
70s/@db_align_t_decl@/typedef unsigned long db_align_t;/
71s/@db_alignp_t_decl@/typedef unsigned long db_alignp_t;/
72s/@db_int_def@//
73ENDOFSEDTEXT
74(echo "$msgc" && sed -f $s ../dbinc/db_int.in) > $t
75cmp $t $f > /dev/null 2>&1 ||
76    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
77
78f=../build_win32/db_config.h
79(echo "$msgc" && sed "s/__EDIT_DB_VERSION__/$DB_VERSION/" win_config.in) > $t
80cmp $t $f > /dev/null 2>&1 ||
81    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
82
83f=../build_win32/libdb.rc
84cat <<ENDOFSEDTEXT > $s
85s/%MAJOR%/$DB_VERSION_MAJOR/
86s/%MINOR%/$DB_VERSION_MINOR/
87s/%PATCH%/$DB_VERSION_PATCH/
88ENDOFSEDTEXT
89sed -f $s ../build_win32/libdbrc.src > $t
90cmp $t $f > /dev/null 2>&1 ||
91    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
92
93f=../build_win32/libdb.def
94(echo $msgw &&
95 echo &&
96 echo \
97 "DESCRIPTION   'Berkeley DB $DB_VERSION_MAJOR.$DB_VERSION_MINOR Library'" &&
98 echo &&
99 echo EXPORTS;
100a=1
101for i in `sed -e '/^$/d' -e '/^#/d' win_exports.in`; do
102        echo "  $i      @$a"
103        a=`expr $a + 1`
104done) > $t
105cmp $t $f > /dev/null 2>&1 ||
106    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
107
108rm -f $s $t
Note: See TracBrowser for help on using the repository browser.