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
10 .PATH: ${.CURDIR}/../../usr.sbin/pwd_mkdb ${.CURDIR}/../../usr.sbin/vipw \
11 ${.CURDIR}/../../libexec/ypxfr \
12 ${.CURDIR}/../../usr.sbin/rpc.yppasswdd
13 CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../usr.sbin/vipw
14 LINKS= ${BINDIR}/chpass ${BINDIR}/chfn
15 LINKS+= ${BINDIR}/chpass ${BINDIR}/chsh
16 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchpass
17 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchfn
18 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchsh
20 MLINKS= chpass.1 chfn.1 chpass.1 chsh.1
21 MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1
23 COPTS+= -DYP -I. -I${.CURDIR}/../../libexec/ypxfr \
24 -I${.CURDIR}/../../usr.sbin/rpc.yppasswdd -Dyp_error=warnx
26 #Some people need this, uncomment to activate
27 #COPTS+= -DRESTRICT_FULLNAME_CHANGE
29 DPADD= ${LIBRPCSVC} ${LIBCRYPT}
30 LDADD+= -lrpcsvc -lcrypt
32 CLEANFILES= ${GENSRCS}
35 RPCSRC= ${DESTDIR}/usr/include/rpcsvc/yp.x
36 RPCSRC_PW= ${DESTDIR}/usr/include/rpcsvc/yppasswd.x
37 RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x
40 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
43 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC}
45 yppasswd.h: ${RPCSRC_PW}
46 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PW}
48 yppasswd_clnt.c: ${RPCSRC_PW}
49 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PW}
51 yppasswd_private.h: ${RPCSRC_PRIV}
52 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PRIV}
54 yppasswd_private_xdr.c: ${RPCSRC_PRIV}
55 ${RPCGEN} -c -o ${.TARGET} ${RPCSRC_PRIV}
57 yppasswd_private_clnt.c: ${RPCSRC_PRIV}
58 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PRIV}
61 .for i in chpass chfn chsh ypchpass ypchfn ypchsh
62 [ ! -e ${DESTDIR}${BINDIR}/$i ] || \
63 chflags noschg ${DESTDIR}${BINDIR}/$i
67 chflags schg ${DESTDIR}${BINDIR}/chpass
69 .include <bsd.prog.mk>