1# $Id$ 2 3PROG= rpc.yppasswdd 4SRCS= pw_copy.c pw_util.c util.c yppasswd_svc.c yp_error.c ypxfr_misc.c \ 5 yp_dblookup.c yp_dbwrite.c yp_access.c yppasswd_private_xdr.c \ 6 yp_clnt.c yppasswdd_server.c yppasswd_comm.c yppasswdd_main.c 7 8RPCDIR= ${.CURDIR}/../../include/rpcsvc 9 10.PATH: ${.CURDIR}/../../usr.sbin/ypserv ${.CURDIR}/../../usr.bin/chpass \ 11 ${.CURDIR}/../../libexec/ypxfr ${RPCDIR} 12 13MAN8= rpc.yppasswdd.8 14 15CFLAGS+= -I${.CURDIR}/../../usr.sbin/vipw -I${.CURDIR}/../../usr.sbin/ypserv \ 16 -I${.CURDIR}/../../libexec/ypxfr -I${.CURDIR}/../../usr.bin/chpass \ 17 -I${.CURDIR} -I. 18 19DPADD= ${LIBRPCSVC} ${LIBCRYPT} 20LDADD= -lrpcsvc -lcrypt 21 22CLEANFILES= yppasswd_svc.c yppasswd.h \ 23 yppasswd_private_xdr.c yppasswd_private.h \ 24 yp.h yp_clnt.c 25 26RPCGEN= rpcgen -I -C 27 28# We need to remove the 'static' keyword from _rpcsvcstate so that 29# yppasswdd_main.c can see it. 30yppasswd_svc.c: yppasswd.x yppasswd.h 31 rm -f ${.TARGET} 32 ${RPCGEN} -m ${RPCDIR}/yppasswd.x | \ 33 sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET} 34 35yppasswd.h: yppasswd.x 36 rm -f ${.TARGET} 37 ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/yppasswd.x 38 39yp.h: yp.x 40 rm -f ${.TARGET} 41 ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/yp.x 42 43yp_clnt.c: yp.x yp.h 44 rm -f ${.TARGET} 45 ${RPCGEN} -DYPSERV_ONLY -l -o ${.TARGET} ${RPCDIR}/yp.x 46 47yppasswd_private.h: yppasswd_private.x 48 rm -f ${.TARGET} 49 ${RPCGEN} -h -o ${.TARGET} ${.CURDIR}/yppasswd_private.x 50 51yppasswd_private_xdr.c: yppasswd_private.x yppasswd_private.h 52 rm -f ${.TARGET} 53 ${RPCGEN} -c -o ${.TARGET} ${.CURDIR}/yppasswd_private.x 54 55afterinstall: 56 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ 57 ${.CURDIR}/yppwupdate \ 58 ${DESTDIR}/usr/libexec/yppwupdate 59 60.include <bsd.prog.mk> 61