When test(1)ing for a symlink, use the -h primitive instead of -L. Although

the latter is supported in our test(1), the former is more portable, and is
defined in 1003.2bD3 and SVID4.  Addresses PR kern/8225 from Andrew Cagney.
This commit is contained in:
kleink 1999-08-22 14:02:34 +00:00
parent 79ce98b212
commit bb0106aee8
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.kinc.mk,v 1.6 1999/08/21 06:17:46 simonb Exp $
# $NetBSD: bsd.kinc.mk,v 1.7 1999/08/22 14:02:34 kleink Exp $
# System configuration variables:
#
@ -67,7 +67,7 @@ SYMLINKS+= ${KDIR} ${INCSDIR}
.PRECIOUS: ${DESTDIR}${INCSDIR}
.PHONY: ${DESTDIR}${INCSDIR}
${DESTDIR}${INCSDIR}:
@if [ ! -d ${.TARGET} ] || [ -L ${.TARGET} ] ; then \
@if [ ! -d ${.TARGET} ] || [ -h ${.TARGET} ] ; then \
echo creating ${.TARGET}; \
/bin/rm -rf ${.TARGET}; \
${INSTALL} ${INSTPRIV} -d -o ${BINOWN} -g ${BINGRP} -m 755 \