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.
This commit is contained in:
Ruslan Ermilov 2004-10-18 21:42:15 +00:00
parent 60110adc64
commit 69c2a92e4d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136678

View File

@ -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 <bsd.prog.mk>