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 ${.CURDIR}/../../lib/libc/gen
15 CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../usr.sbin/vipw -I${.CURDIR}/../../lib/libc/gen
16 LINKS= ${BINDIR}/chpass ${BINDIR}/chfn
17 LINKS+= ${BINDIR}/chpass ${BINDIR}/chsh
18 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchpass
19 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchfn
20 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchsh
22 MLINKS= chpass.1 chfn.1 chpass.1 chsh.1
23 MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1
25 CFLAGS+=-DYP -I. -I${.CURDIR}/../../libexec/ypxfr \
26 -I${.CURDIR}/../../usr.sbin/rpc.yppasswdd -Dyp_error=warnx
28 #Some people need this, uncomment to activate
29 #CFLAGS+=-DRESTRICT_FULLNAME_CHANGE
31 DPADD= ${LIBRPCSVC} ${LIBCRYPT} ${LIBMD}
32 LDADD+= -lrpcsvc -lcrypt -lmd
34 CLEANFILES= ${GENSRCS}
37 RPCSRC= ${DESTDIR}/usr/include/rpcsvc/yp.x
38 RPCSRC_PW= ${DESTDIR}/usr/include/rpcsvc/yppasswd.x
39 RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x
42 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
45 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC}
47 yppasswd.h: ${RPCSRC_PW}
48 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PW}
50 yppasswd_clnt.c: ${RPCSRC_PW}
51 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PW}
53 yppasswd_private.h: ${RPCSRC_PRIV}
54 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PRIV}
56 yppasswd_private_xdr.c: ${RPCSRC_PRIV}
57 ${RPCGEN} -c -o ${.TARGET} ${RPCSRC_PRIV}
59 yppasswd_private_clnt.c: ${RPCSRC_PRIV}
60 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PRIV}
63 .for i in chpass chfn chsh ypchpass ypchfn ypchsh
64 [ ! -e ${DESTDIR}${BINDIR}/$i ] || \
65 chflags noschg ${DESTDIR}${BINDIR}/$i || true
69 -chflags schg ${DESTDIR}${BINDIR}/chpass
71 .include <bsd.prog.mk>