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:
parent
60110adc64
commit
69c2a92e4d
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user