blob: 7da75819e069c210ddbc7af3f12fe781afdf5aa9 (
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
|
#!/bin/sh -
# $Id: s_rpc,v 12.0 2004/11/17 03:43:35 bostic Exp $
#
# Build the automatically generated RPC files
echo "Building RPC client/server files..."
. ./RELEASE
t=/tmp/__db_a
trap 'rm -f $t ; exit 0' 0
trap 'rm -f $t ; exit 1' 1 2 3 13 15
client_file=../rpc_client/gen_client.c
ctmpl_file=./template/gen_client_ret
server_file=../rpc_server/c/gen_db_server.c
stmpl_file=./template/db_server_proc
xdr_file=../rpc_server/db_server.x
rm -f $client_file $ctmpl_file $server_file $stmpl_file $xdr_file
#
# Generate client/server/XDR code
#
xidsize=\
`awk '/^#define/ { if ($2 == "DB_XIDDATASIZE") { print $3 }}' ../dbinc/db.in`
awk -f gen_rpc.awk \
-v client_file=$client_file \
-v ctmpl_file=$ctmpl_file \
-v major=$DB_VERSION_MAJOR \
-v minor=$DB_VERSION_MINOR \
-v server_file=$server_file \
-v stmpl_file=$stmpl_file \
-v xdr_file=$xdr_file \
-v xidsize=$xidsize < ../rpc_server/rpc.src
chmod 444 $client_file $server_file
|