Don't try to get at ${DESTDIR} inside /usr/libexec/makewhatis; instead,

supply ${DESTDIR} as part of the command line argument in
src/share/man/Makefile, and use that modified $MANPATH to find
makewhatis.sed.
This commit is contained in:
tv 1998-05-21 11:40:11 +00:00
parent ad6b563dc3
commit 2a0a609947
2 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
#! /bin/sh
#
# $NetBSD: makewhatis.sh,v 1.13 1998/03/21 23:46:00 tron Exp $
# $NetBSD: makewhatis.sh,v 1.14 1998/05/21 11:40:11 tv Exp $
#
# written by matthew green <mrg@eterna.com.au>, based on the
# original by J.T. Conklin <jtc@netbsd.org> and Thorsten
@ -14,12 +14,12 @@ TMP=/tmp/whatis$$
trap "rm -f $LIST $TMP; exit 1" 1 2 15
MANDIR=${1-/usr/share/man}
if test ! -d "${DESTDIR}$MANDIR"; then
echo "makewhatis: ${DESTDIR}$MANDIR: not a directory"
if test ! -d "$MANDIR"; then
echo "makewhatis: $MANDIR: not a directory"
exit 1
fi
find ${DESTDIR}$MANDIR \( -type f -o -type l \) -name '*.[0-9]*' -ls | \
find $MANDIR \( -type f -o -type l \) -name '*.[0-9]*' -ls | \
sort -n | awk '{if (u[$1]) next; u[$1]++ ; print $11}' > $LIST
egrep '\.[1-9]$' $LIST | xargs /usr/libexec/getNAME | \
@ -27,12 +27,12 @@ egrep '\.[1-9]$' $LIST | xargs /usr/libexec/getNAME | \
egrep '\.0$' $LIST | while read file
do
sed -n -f ${DESTDIR}/usr/share/man/makewhatis.sed $file;
sed -n -f $MANDIR/makewhatis.sed $file;
done >> $TMP
egrep '\.[0].(gz|Z)$' $LIST | while read file
do
gzip -fdc $file | sed -n -f ${DESTDIR}/usr/share/man/makewhatis.sed;
gzip -fdc $file | sed -n -f $MANDIR/makewhatis.sed;
done >> $TMP
sort -u -o $TMP $TMP

View File

@ -1,9 +1,9 @@
# $NetBSD: Makefile,v 1.15 1998/04/22 07:14:30 ross Exp $
# $NetBSD: Makefile,v 1.16 1998/05/21 11:40:11 tv Exp $
# from: @(#)Makefile 8.2 (Berkeley) 4/16/94
SUBDIR= man0 man1 man3 man4 man5 man6 man7 man8 man9
makedb:
/usr/libexec/makewhatis /usr/share/man
${DESTDIR}/usr/libexec/makewhatis ${DESTDIR}/usr/share/man
.include <bsd.subdir.mk>