mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
69c2a92e4d
the implementation of the following feature in revision 1.4: - Install Makefile.yp as /var/yp/Makefile.dist and link it to /var/yp/Makefile only if /var/yp/Makefile doesn't already exist. Suggested by Peter Wemm. The actual code was only symlinking when no /var/yp/Makefile.dist existed, i.e., never.
43 lines
937 B
Makefile
43 lines
937 B
Makefile
# $FreeBSD$
|
|
|
|
RPCDIR= ${.CURDIR}/../../include/rpcsvc
|
|
.PATH: ${RPCDIR}
|
|
|
|
PROG= ypserv
|
|
MAN= ypserv.8 ypinit.8
|
|
SRCS= yp_svc.c yp_server.c yp_dblookup.c yp_dnslookup.c \
|
|
ypxfr_clnt.c yp.h yp_main.c yp_error.c yp_access.c yp_svc_udp.c
|
|
|
|
CFLAGS+= -DDB_CACHE -DTCP_WRAPPER -I.
|
|
|
|
DPADD= ${LIBWRAP}
|
|
LDADD= -lwrap
|
|
|
|
CLEANFILES= yp_svc.c ypxfr_clnt.c yp.h
|
|
|
|
RPCGEN= rpcgen -I -C
|
|
|
|
# We need to remove the 'static' keyword from _rpcsvcstate so that
|
|
# yp_main.c can see it.
|
|
yp_svc.c: yp.x
|
|
rm -f ${.TARGET}
|
|
${RPCGEN} -DYPSERV_ONLY -m ${RPCDIR}/yp.x | \
|
|
sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET}
|
|
|
|
ypxfr_clnt.c: yp.x
|
|
${RPCGEN} -DYPPUSH_ONLY -l -o ${.TARGET} ${RPCDIR}/yp.x
|
|
|
|
yp.h: yp.x
|
|
${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/yp.x
|
|
|
|
FILES= Makefile.yp
|
|
FILESNAME= Makefile.dist
|
|
FILESDIR= /var/yp
|
|
SCRIPTS= ypinit.sh
|
|
|
|
.if !exists(${DESTDIR}${FILESDIR}/Makefile)
|
|
SYMLINKS= ${FILESNAME} ${FILESDIR}/Makefile
|
|
.endif
|
|
|
|
.include <bsd.prog.mk>
|