]> git.cameronkatri.com Git - pw-darwin.git/blob - chpass/Makefile
Add manpage links ypchpass.1, ypchfn.1, ypchsh.1
[pw-darwin.git] / chpass / Makefile
1 # @(#)Makefile 8.2 (Berkeley) 4/2/94
2
3 PROG= chpass
4 SRCS= chpass.c edit.c field.c pw_copy.c pw_scan.c pw_util.c table.c util.c
5 BINOWN= root
6 BINMODE=4555
7 .PATH: ${.CURDIR}/../../usr.sbin/pwd_mkdb ${.CURDIR}/../../usr.sbin/vipw \
8 ${.CURDIR}/../../libexec/ypxfr \
9 ${.CURDIR}/../../usr.sbin/rpc.yppasswdd
10 CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../usr.sbin/vipw
11 LINKS= ${BINDIR}/chpass ${BINDIR}/chfn
12 LINKS+= ${BINDIR}/chpass ${BINDIR}/chsh
13 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchpass
14 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchfn
15 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchsh
16
17 MLINKS= chpass.1 chfn.1 chpass.1 chsh.1
18 MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1
19
20 COPTS+= -DYP -I. -I${.CURDIR}/../../libexec/ypxfr \
21 -I${.CURDIR}/../../usr.sbin/rpc.yppasswdd -Dyp_error=warnx
22
23 #Some people need this, uncomment to activate
24 #COPTS+= -DRESTRICT_FULLNAME_CHANGE
25
26 SRCS+= yppasswd_private_xdr.c yppasswd_private_clnt.c yp_clnt.c \
27 yppasswd_clnt.c pw_yp.c ypxfr_misc.c
28 CLEANFILES= yp_clnt.c yp.h yppasswd_clnt.c yppasswd.h \
29 yppasswd_private_xdr.c yppasswd_private_clnt.c yppasswd_private.h
30
31 DPADD= ${LIBRPCSVC} ${LIBCRYPT}
32 LDADD+= -lrpcsvc -lcrypt
33
34 RPCGEN= rpcgen -C
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
38
39 yp.h: ${RPCSRC}
40 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
41
42 yp_clnt.c: ${RPCSRC} yp.h
43 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC}
44
45 yppasswd.h: ${RPCSRC_PW}
46 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PW}
47
48 yppasswd_clnt.c: ${RPCSRC_PW} yppasswd.h
49 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PW}
50
51 yppasswd_private.h: ${RPCSRC_PRIV}
52 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PRIV}
53
54 yppasswd_private_xdr.c: ${RPCSRC_PRIV} yppasswd_private.h
55 ${RPCGEN} -c -o ${.TARGET} ${RPCSRC_PRIV}
56
57 yppasswd_private_clnt.c: ${RPCSRC_PRIV} yppasswd_private.h
58 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PRIV}
59
60 beforeinstall:
61 .for i in chpass chfn chsh ypchpass ypchfn ypchsh
62 [ ! -e ${DESTDIR}${BINDIR}/$i ] || \
63 chflags noschg ${DESTDIR}${BINDIR}/$i
64 .endfor
65
66 afterinstall:
67 chflags schg ${DESTDIR}${BINDIR}/chpass
68
69 .include <bsd.prog.mk>