1 # @(#)Makefile 8.2 (Berkeley) 4/2/94
6 SRCS= chpass.c edit.c field.c pw_copy.c pw_scan.c pw_util.c pw_yp.c \
7 table.c util.c ypxfr_misc.c ${GENSRCS}
8 GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c yppasswd_private.h \
9 yppasswd_private_clnt.c yppasswd_private_xdr.c
11 .PATH: ${.CURDIR}/../../usr.sbin/pwd_mkdb ${.CURDIR}/../../usr.sbin/vipw \
12 ${.CURDIR}/../../libexec/ypxfr \
13 ${.CURDIR}/../../usr.sbin/rpc.yppasswdd
14 CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../usr.sbin/vipw
15 LINKS= ${BINDIR}/chpass ${BINDIR}/chfn
16 LINKS+= ${BINDIR}/chpass ${BINDIR}/chsh
17 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchpass
18 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchfn
19 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchsh
21 MLINKS= chpass.1 chfn.1 chpass.1 chsh.1
22 MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1
24 COPTS+= -DYP -I. -I${.CURDIR}/../../libexec/ypxfr \
25 -I${.CURDIR}/../../usr.sbin/rpc.yppasswdd -Dyp_error=warnx
27 #Some people need this, uncomment to activate
28 #COPTS+= -DRESTRICT_FULLNAME_CHANGE
30 DPADD= ${LIBRPCSVC} ${LIBCRYPT}
31 LDADD+= -lrpcsvc -lcrypt
33 CLEANFILES= ${GENSRCS}
36 RPCSRC= ${DESTDIR}/usr/include/rpcsvc/yp.x
37 RPCSRC_PW= ${DESTDIR}/usr/include/rpcsvc/yppasswd.x
38 RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x
41 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
44 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC}
46 yppasswd.h: ${RPCSRC_PW}
47 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PW}
49 yppasswd_clnt.c: ${RPCSRC_PW}
50 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PW}
52 yppasswd_private.h: ${RPCSRC_PRIV}
53 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PRIV}
55 yppasswd_private_xdr.c: ${RPCSRC_PRIV}
56 ${RPCGEN} -c -o ${.TARGET} ${RPCSRC_PRIV}
58 yppasswd_private_clnt.c: ${RPCSRC_PRIV}
59 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PRIV}
62 .for i in chpass chfn chsh ypchpass ypchfn ypchsh
63 [ ! -e ${DESTDIR}${BINDIR}/$i ] || \
64 chflags noschg ${DESTDIR}${BINDIR}/$i || true
68 -chflags schg ${DESTDIR}${BINDIR}/chpass
70 .include <bsd.prog.mk>