]> git.cameronkatri.com Git - pw-darwin.git/blob - chpass/Makefile
Allow comments and blank lines as advertised in passwd(5).
[pw-darwin.git] / chpass / Makefile
1 # @(#)Makefile 8.2 (Berkeley) 4/2/94
2
3 PROG= chpass
4 CFLAGS+=-Wall -DPASSWD_IGNORE_COMMENTS
5 SRCS= chpass.c edit.c field.c pw_copy.c pw_scan.c pw_util.c pw_yp.c \
6 table.c util.c ypxfr_misc.c ${GENSRCS}
7 GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c yppasswd_private.h \
8 yppasswd_private_clnt.c yppasswd_private_xdr.c
9 BINMODE=4555
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
19
20 MLINKS= chpass.1 chfn.1 chpass.1 chsh.1
21 MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1
22
23 COPTS+= -DYP -I. -I${.CURDIR}/../../libexec/ypxfr \
24 -I${.CURDIR}/../../usr.sbin/rpc.yppasswdd -Dyp_error=warnx
25
26 #Some people need this, uncomment to activate
27 #COPTS+= -DRESTRICT_FULLNAME_CHANGE
28
29 DPADD= ${LIBRPCSVC} ${LIBCRYPT}
30 LDADD+= -lrpcsvc -lcrypt
31
32 CLEANFILES= ${GENSRCS}
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}
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}
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}
55 ${RPCGEN} -c -o ${.TARGET} ${RPCSRC_PRIV}
56
57 yppasswd_private_clnt.c: ${RPCSRC_PRIV}
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 || true
64 .endfor
65
66 afterinstall:
67 -chflags schg ${DESTDIR}${BINDIR}/chpass
68
69 .include <bsd.prog.mk>