MFC r1.7 (HEAD):
[dragonfly.git] / usr.sbin / ypserv / Makefile
blob4466b7bd1cd483236205cc730d3ec4dda3896a14
1 # $FreeBSD: src/usr.sbin/ypserv/Makefile,v 1.17.2.3 2002/08/07 16:32:02 ru Exp $
2 # $DragonFly: src/usr.sbin/ypserv/Makefile,v 1.3 2005/07/07 11:49:57 corecode Exp $
4 PROG= ypserv
5 SRCS= yp_svc.c yp_server.c yp_dblookup.c yp_dnslookup.c \
6 ypxfr_clnt.c yp.h yp_main.c yp_error.c yp_access.c yp_svc_udp.c
8 MAN= ypserv.8 ypinit.8
10 CFLAGS+= -I. -DDB_CACHE
12 CLEANFILES= yp_svc.c ypxfr_clnt.c yp.h
14 RPCDIR= ${.CURDIR}/../../include/rpcsvc
15 .PATH: ${RPCDIR}
17 RPCGEN= rpcgen -I -C
19 # We need to remove the 'static' keyword from _rpcsvcstate so that
20 # yp_main.c can see it.
21 yp_svc.c: yp.x
22 rm -f ${.TARGET}
23 ${RPCGEN} -DYPSERV_ONLY -m ${RPCDIR}/yp.x | \
24 sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET}
26 ypxfr_clnt.c: yp.x
27 ${RPCGEN} -DYPPUSH_ONLY -l -o ${.TARGET} ${RPCDIR}/yp.x
29 yp.h: yp.x
30 ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/yp.x
32 afterinstall:
33 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
34 ${.CURDIR}/Makefile.yp \
35 ${DESTDIR}/var/yp/Makefile.dist
36 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
37 ${.CURDIR}/ypinit.sh ${DESTDIR}${BINDIR}/ypinit
38 @if [ ! -f ${DESTDIR}/var/yp/Makefile.dist ]; then \
39 ${LN} -s ${DESTDIR}/var/yp/Makefile.dist \
40 ${DESTDIR}/var/yp/Makefile; fi
42 .include <bsd.prog.mk>