thisconfigdir=../../..
myfulldir=lib/rpc/unit-test
mydir=lib/rpc/unit-test
BUILDTOP=$(REL)..$(S)..$(S)..
LOCALINCLUDES = -I.
PROG_LIBPATH=-L$(TOPLIBD)
PROG_RPATH=$(KRB5_LIBDIR)
DEFS=
OBJS= client.o rpc_test_clnt.o rpc_test_svc.o server.o
SRCS= client.c rpc_test_clnt.c rpc_test_svc.c server.c
all:: client server
client: client.o rpc_test_clnt.o $(GSSRPC_DEPLIBS) $(KRB5_BASE_DEPLIBS)
$(CC_LINK) -o client client.o rpc_test_clnt.o \
$(GSSRPC_LIBS) $(KRB5_BASE_LIBS)
server: server.o rpc_test_svc.o $(GSSRPC_DEPLIBS) $(KRB5_BASE_DEPLIBS)
$(CC_LINK) -o server server.o rpc_test_svc.o \
$(GSSRPC_LIBS) $(KRB5_BASE_LIBS)
client.o server.o: rpc_test.h
check unit-test:: unit-test-@DO_TEST@
unit-test-:
@echo "+++"
@echo "+++ WARNING: lib/rpc unit tests not run."
@echo "+++ Either tcl, runtest, or Perl is unavailable."
@echo "+++"
unit-test-ok:: unit-test-body
PASS=@PASS@
unit-test-body:
$(RM) krb5cc_rpc_test_*
$(ENV_SETUP) $(START_SERVERS)
RPC_TEST_SRVTAB=/tmp/rpc_test_v5srvtab.$$$$ ; export RPC_TEST_SRVTAB ; \
trap "echo Failed, cleaning up... ; rm -f $$RPC_TEST_SRVTAB ; $(ENV_SETUP) $(STOP_SERVERS) ; trap '' 0 ; exit 1" 0 1 2 3 14 15 ; \
if $(ENV_SETUP) \
$(RUNTEST) SERVER=./server CLIENT=./client \
KINIT=$(BUILDTOP)/clients/kinit/kinit \
KDESTROY=$(BUILDTOP)/clients/kdestroy/kdestroy \
PRIOCNTL_HACK=@PRIOCNTL_HACK@ VALGRIND="$(VALGRIND)" \
PASS="$(PASS)" --tool rpc_test $(RUNTESTFLAGS) ; \
then \
echo Cleaning up... ; \
rm -f $$RPC_TEST_SRVTAB krb5cc_rpc_test_* ; \
$(ENV_SETUP) $(STOP_SERVERS) ; \
trap 0 ; exit 0 ; \
else exit 1 ; fi
clean::
$(RM) server client
$(RM) dbg.log rpc_test.log rpc_test.sum
$(OUTPRE)client.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
$(BUILDTOP)/include/gssapi/gssapi.h $(BUILDTOP)/include/gssrpc/types.h \
$(SRCTOP)/include/gssrpc/auth.h $(SRCTOP)/include/gssrpc/auth_gss.h \
$(SRCTOP)/include/gssrpc/auth_gssapi.h $(SRCTOP)/include/gssrpc/auth_unix.h \
$(SRCTOP)/include/gssrpc/clnt.h $(SRCTOP)/include/gssrpc/rename.h \
$(SRCTOP)/include/gssrpc/rpc.h $(SRCTOP)/include/gssrpc/rpc_msg.h \
$(SRCTOP)/include/gssrpc/svc.h $(SRCTOP)/include/gssrpc/svc_auth.h \
$(SRCTOP)/include/gssrpc/xdr.h client.c rpc_test.h
$(OUTPRE)rpc_test_clnt.$(OBJEXT): $(BUILDTOP)/include/gssapi/gssapi.h \
$(BUILDTOP)/include/gssrpc/types.h $(SRCTOP)/include/gssrpc/auth.h \
$(SRCTOP)/include/gssrpc/auth_gss.h $(SRCTOP)/include/gssrpc/auth_unix.h \
$(SRCTOP)/include/gssrpc/clnt.h $(SRCTOP)/include/gssrpc/rename.h \
$(SRCTOP)/include/gssrpc/rpc.h $(SRCTOP)/include/gssrpc/rpc_msg.h \
$(SRCTOP)/include/gssrpc/svc.h $(SRCTOP)/include/gssrpc/svc_auth.h \
$(SRCTOP)/include/gssrpc/xdr.h rpc_test.h rpc_test_clnt.c
$(OUTPRE)rpc_test_svc.$(OBJEXT): $(BUILDTOP)/include/gssapi/gssapi.h \
$(BUILDTOP)/include/gssrpc/types.h $(SRCTOP)/include/gssrpc/auth.h \
$(SRCTOP)/include/gssrpc/auth_gss.h $(SRCTOP)/include/gssrpc/auth_unix.h \
$(SRCTOP)/include/gssrpc/clnt.h $(SRCTOP)/include/gssrpc/rename.h \
$(SRCTOP)/include/gssrpc/rpc.h $(SRCTOP)/include/gssrpc/rpc_msg.h \
$(SRCTOP)/include/gssrpc/svc.h $(SRCTOP)/include/gssrpc/svc_auth.h \
$(SRCTOP)/include/gssrpc/xdr.h rpc_test.h rpc_test_svc.c
$(OUTPRE)server.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
$(BUILDTOP)/include/gssapi/gssapi.h $(BUILDTOP)/include/gssapi/gssapi_generic.h \
$(BUILDTOP)/include/gssrpc/types.h $(SRCTOP)/include/gssrpc/auth.h \
$(SRCTOP)/include/gssrpc/auth_gss.h $(SRCTOP)/include/gssrpc/auth_gssapi.h \
$(SRCTOP)/include/gssrpc/auth_unix.h $(SRCTOP)/include/gssrpc/clnt.h \
$(SRCTOP)/include/gssrpc/pmap_clnt.h $(SRCTOP)/include/gssrpc/rename.h \
$(SRCTOP)/include/gssrpc/rpc.h $(SRCTOP)/include/gssrpc/rpc_msg.h \
$(SRCTOP)/include/gssrpc/svc.h $(SRCTOP)/include/gssrpc/svc_auth.h \
$(SRCTOP)/include/gssrpc/xdr.h rpc_test.h server.c