From c5d8886d0401b49a61c74f9f6ea178f0e9a80a7b Mon Sep 17 00:00:00 2001 From: ru Date: Mon, 18 Oct 2004 21:42:15 +0000 Subject: Utilize FILES, SCRIPTS, and SYMLINKS. While here, fixed a bug in 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. --- usr.sbin/ypserv/Makefile | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'usr.sbin/ypserv') diff --git a/usr.sbin/ypserv/Makefile b/usr.sbin/ypserv/Makefile index db21523..c1b2df3 100644 --- a/usr.sbin/ypserv/Makefile +++ b/usr.sbin/ypserv/Makefile @@ -30,14 +30,13 @@ ypxfr_clnt.c: yp.x yp.h: yp.x ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/yp.x -afterinstall: - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${.CURDIR}/Makefile.yp \ - ${DESTDIR}/var/yp/Makefile.dist - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \ - ${.CURDIR}/ypinit.sh ${DESTDIR}${BINDIR}/ypinit - @if [ ! -f ${DESTDIR}/var/yp/Makefile.dist ]; then \ - ln -s ${DESTDIR}/var/yp/Makefile.dist \ - ${DESTDIR}/var/yp/Makefile; fi +FILES= Makefile.yp +FILESNAME= Makefile.dist +FILESDIR= /var/yp +SCRIPTS= ypinit.sh + +.if !exists(${DESTDIR}${FILESDIR}/Makefile) +SYMLINKS= ${FILESNAME} ${FILESDIR}/Makefile +.endif .include -- cgit v1.1