1 # @(#)Makefile 8.2 (Berkeley) 4/2/94
4 SRCS= chpass.c edit.c field.c pw_copy.c pw_scan.c pw_util.c pw_yp.c \
5 table.c util.c ypxfr_misc.c ${GENSRCS}
6 GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c yppasswd_private.h \
7 yppasswd_private_clnt.c yppasswd_private_xdr.c
9 .PATH: ${.CURDIR}/../../usr.sbin/pwd_mkdb ${.CURDIR}/../../usr.sbin/vipw \
10 ${.CURDIR}/../../libexec/ypxfr \
11 ${.CURDIR}/../../usr.sbin/rpc.yppasswdd
12 CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../usr.sbin/vipw
13 LINKS= ${BINDIR}/chpass ${BINDIR}/chfn
14 LINKS+= ${BINDIR}/chpass ${BINDIR}/chsh
15 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchpass
16 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchfn
17 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchsh
19 MLINKS= chpass.1 chfn.1 chpass.1 chsh.1
20 MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1
22 COPTS+= -DYP -I. -I${.CURDIR}/../../libexec/ypxfr \
23 -I${.CURDIR}/../../usr.sbin/rpc.yppasswdd -Dyp_error=warnx
25 #Some people need this, uncomment to activate
26 #COPTS+= -DRESTRICT_FULLNAME_CHANGE
28 DPADD= ${LIBRPCSVC} ${LIBCRYPT}
29 LDADD+= -lrpcsvc -lcrypt
31 CLEANFILES= ${GENSRCS}
34 RPCSRC= ${DESTDIR}/usr/include/rpcsvc/yp.x
35 RPCSRC_PW= ${DESTDIR}/usr/include/rpcsvc/yppasswd.x
36 RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x
39 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
42 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC}
44 yppasswd.h: ${RPCSRC_PW}
45 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PW}
47 yppasswd_clnt.c: ${RPCSRC_PW}
48 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PW}
50 yppasswd_private.h: ${RPCSRC_PRIV}
51 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PRIV}
53 yppasswd_private_xdr.c: ${RPCSRC_PRIV}
54 ${RPCGEN} -c -o ${.TARGET} ${RPCSRC_PRIV}
56 yppasswd_private_clnt.c: ${RPCSRC_PRIV}
57 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PRIV}
60 .for i in chpass chfn chsh ypchpass ypchfn ypchsh
61 [ ! -e ${DESTDIR}${BINDIR}/$i ] || \
62 chflags noschg ${DESTDIR}${BINDIR}/$i
66 chflags schg ${DESTDIR}${BINDIR}/chpass
68 .include <bsd.prog.mk>