mariadb/bdb/dist/s_rpc
unknown d7eb456ad3 Clean out some more generated files from the bdb tree. Add a hack
to bdb/dist/s_rpc so that bk doesn't complain about the
rpc_server/db_server_proc.c file that gets overwritten (but needs to
be stored in BK).  Add a bdb/dist/template directory which is needed
by bdb/dist/s_recover.


BitKeeper/deleted/.del-gen_client_ext.h~5c621cacb18b38:
  Delete: bdb/include/gen_client_ext.h
BitKeeper/deleted/.del-gen_client_ret~786a5e65119b3991:
  Delete: bdb/dist/template/gen_client_ret
BitKeeper/deleted/.del-db_server.x~811aeb6b630fe7aa:
  Delete: bdb/rpc_server/db_server.x
BitKeeper/deleted/.del-db_server_proc.sed~1a9af8e5b051acbd:
  Delete: bdb/rpc_server/db_server_proc.sed
BitKeeper/deleted/.del-db_server_proc~2e8b49d42aefab55:
  Delete: bdb/dist/template/db_server_proc
BitKeeper/deleted/.del-gen_server_ext.h~fd7bcfe6bbca8bcb:
  Delete: bdb/include/gen_server_ext.h
BitKeeper/deleted/.del-db_archive.dsp~e3da826e91bb086:
  Delete: bdb/build_win32/db_archive.dsp
BitKeeper/deleted/.del-db_checkpoint.dsp~8071af22db95b1db:
  Delete: bdb/build_win32/db_checkpoint.dsp
BitKeeper/deleted/.del-db_deadlock.dsp~befd45d29eaeb672:
  Delete: bdb/build_win32/db_deadlock.dsp
BitKeeper/deleted/.del-db_dll.dsp~4e9dda53c84511b6:
  Delete: bdb/build_win32/db_dll.dsp
BitKeeper/deleted/.del-db_dump.dsp~e07d2a82708b61:
  Delete: bdb/build_win32/db_dump.dsp
BitKeeper/deleted/.del-db_java.dsp~e3941d5a9810b360:
  Delete: bdb/build_win32/db_java.dsp
BitKeeper/deleted/.del-db_load.dsp~e83a2af8e24a715d:
  Delete: bdb/build_win32/db_load.dsp
BitKeeper/deleted/.del-db_printlog.dsp~163f6e1073a5f396:
  Delete: bdb/build_win32/db_printlog.dsp
BitKeeper/deleted/.del-db_recover.dsp~835c32ab73359256:
  Delete: bdb/build_win32/db_recover.dsp
BitKeeper/deleted/.del-db_stat.dsp~f77417f5d9984986:
  Delete: bdb/build_win32/db_stat.dsp
BitKeeper/deleted/.del-db_static.dsp~78ea414467defc70:
  Delete: bdb/build_win32/db_static.dsp
BitKeeper/deleted/.del-db_tcl.dsp~5ad951d774e41520:
  Delete: bdb/build_win32/db_tcl.dsp
BitKeeper/deleted/.del-db_upgrade.dsp~90fd250190af4984:
  Delete: bdb/build_win32/db_upgrade.dsp
BitKeeper/deleted/.del-db_verify.dsp~e9a4938542f86cea:
  Delete: bdb/build_win32/db_verify.dsp
BitKeeper/deleted/.del-ex_access.dsp~8dd6017efffae14e:
  Delete: bdb/build_win32/ex_access.dsp
BitKeeper/deleted/.del-ex_btrec.dsp~c87137287d8d67dc:
  Delete: bdb/build_win32/ex_btrec.dsp
BitKeeper/deleted/.del-ex_env.dsp~1732d5e41efda77:
  Delete: bdb/build_win32/ex_env.dsp
BitKeeper/deleted/.del-ex_lock.dsp~286d2566e786dde:
  Delete: bdb/build_win32/ex_lock.dsp
BitKeeper/deleted/.del-ex_mpool.dsp~9eb937bc70c1573:
  Delete: bdb/build_win32/ex_mpool.dsp
BitKeeper/deleted/.del-ex_tpcb.dsp~644b38dae8b38152:
  Delete: bdb/build_win32/ex_tpcb.dsp
BitKeeper/deleted/.del-excxx_access.dsp~31e87b6228470681:
  Delete: bdb/build_win32/excxx_access.dsp
BitKeeper/deleted/.del-excxx_btrec.dsp~61b563f4ac1f73eb:
  Delete: bdb/build_win32/excxx_btrec.dsp
BitKeeper/deleted/.del-excxx_env.dsp~b0bf2649a4c797ac:
  Delete: bdb/build_win32/excxx_env.dsp
BitKeeper/deleted/.del-excxx_lock.dsp~257abf03544f6270:
  Delete: bdb/build_win32/excxx_lock.dsp
BitKeeper/deleted/.del-excxx_mpool.dsp~d17a5d09f09f5217:
  Delete: bdb/build_win32/excxx_mpool.dsp
BitKeeper/deleted/.del-excxx_tpcb.dsp~159c727e2c15105e:
  Delete: bdb/build_win32/excxx_tpcb.dsp
BitKeeper/deleted/.del-logtrack.list~7f4f1382b37d98e5:
  Delete: bdb/test/logtrack.list
BitKeeper/etc/ignore:
  added bdb/build_win32/db_archive.dsp bdb/build_win32/db_checkpoint.dsp bdb/build_win32/db_deadlock.dsp bdb/build_win32/db_dump.dsp bdb/build_win32/db_load.dsp bdb/build_win32/db_printlog.dsp bdb/build_win32/db_recover.dsp bdb/build_win32/db_stat.dsp bdb/build_win32/db_upgrade.dsp bdb/build_win32/db_verify.dsp bdb/build_win32/ex_access.dsp bdb/build_win32/ex_btrec.dsp bdb/build_win32/ex_env.dsp bdb/build_win32/ex_lock.dsp bdb/build_win32/ex_mpool.dsp bdb/build_win32/ex_tpcb.dsp bdb/build_win32/excxx_access.dsp bdb/build_win32/excxx_btrec.dsp bdb/build_win32/excxx_env.dsp bdb/build_win32/excxx_lock.dsp bdb/build_win32/excxx_mpool.dsp bdb/build_win32/excxx_tpcb.dsp bdb/build_win32/db_dll.dsp bdb/build_win32/db_java.dsp bdb/build_win32/db_static.dsp bdb/build_win32/db_tcl.dsp bdb/dist/template/gen_client_ret bdb/dist/template/db_server_proc bdb/include/gen_client_ext.h bdb/include/gen_server_ext.h bdb/rpc_server/db_server_proc.sed bdb/rpc_server/db_server.x bdb/test/logtrack.list
bdb/dist/s_rpc:
  This is a hack to handle the $proc_file special case.  Since it
  is both a source file and a generated file, we have to dance a
  bit to get it to work with 'bk get', not just with 'bk edit'.
  This still isn't perfect (I don't know what perfect would be in
  this case), but it seems to work for now.
2001-05-18 12:43:16 -04:00

82 lines
2.6 KiB
Bash

#!/bin/sh -
# $Id: s_rpc,v 11.6 2000/04/26 19:15:51 sue Exp $
#
# Build the automatically generated RPC files
echo "Building RPC client/server files"
client_file=../rpc_client/gen_client.c
cproto_file=../include/gen_client_ext.h
ctmpl_file=./template/gen_client_ret
header_file=../include/db_server.h
rpcclnt_file=../rpc_client/db_server_clnt.c
rpcsvc_file=../rpc_server/db_server_svc.c
rpcxdr_file=../rpc_server/db_server_xdr.c
sed_file=../rpc_server/db_server_proc.sed
server_file=../rpc_server/gen_db_server.c
sproto_file=../include/gen_server_ext.h
stmpl_file=./template/db_server_proc
xdr_file=../rpc_server/db_server.x
#
# NOTE: We do NOT want to remove proc_file. It is what we apply
# sed_file to, but we do not want to remove it.
#
proc_file=../rpc_server/db_server_proc.c
svrsed_file=../rpc_server/db_server_svc.sed
rpcsed_file=../rpc_server/db_server.sed
rm -f $client_file $cproto_file $ctmpl_file $header_file $rpcsvc_file \
$rpcclnt_file $rpcxdr_file $sed_file $server_file $sproto_file \
$stmpl_file $xdr_file
#
# Generate client/server/XDR code
#
awk -f gen_rpc.awk \
-v client_file=$client_file \
-v cproto_file=$cproto_file \
-v ctmpl_file=$ctmpl_file \
-v sed_file=$sed_file \
-v server_file=$server_file \
-v sproto_file=$sproto_file \
-v stmpl_file=$stmpl_file \
-v xdr_file=$xdr_file < ../rpc_server/rpc.src
chmod 444 $client_file $server_file
#
# Now run rpcgen to generate all our sources from the XDR file
#
rpcgen -h $xdr_file > $header_file
rpcgen -l $xdr_file > $rpcclnt_file
rpcgen -s tcp $xdr_file > $rpcsvc_file
rpcgen -c $xdr_file > $rpcxdr_file
# Run server files through sed
sed -f $svrsed_file $rpcsvc_file > ${rpcsvc_file}.new
mv ${rpcsvc_file}.new $rpcsvc_file
#
# This is a hack to handle the $proc_file special case. Since it
# is both a source file and a generated file, we have to dance a
# bit to get it to work with 'bk get', not just with 'bk edit'.
# This still isn't perfect (I don't know what perfect would be in
# this case), but it seems to work for now.
#
#sed -f $sed_file $proc_file > ${proc_file}.new
#mv ${proc_file}.new $proc_file
#
mv $proc_file ${proc_file}.old
sed -f $sed_file ${proc_file}.old > $proc_file
test -w ${proc_file}.old || chmod a-w $proc_file
rm -f ${proc_file}.old
# Run rpcgen files through sed to add HAVE_RPC ifdef
sed -f $rpcsed_file $rpcsvc_file > ${rpcsvc_file}.new
mv ${rpcsvc_file}.new $rpcsvc_file
sed -f $rpcsed_file $rpcxdr_file > ${rpcxdr_file}.new
mv ${rpcxdr_file}.new $rpcxdr_file
sed -f $rpcsed_file $rpcclnt_file > ${rpcclnt_file}.new
mv ${rpcclnt_file}.new $rpcclnt_file
chmod 444 $header_file $rpcclnt_file $rpcsvc_file $rpcxdr_file