From edd04c6f2b9f5fea07bd2260b89d789e0da0cbbc Mon Sep 17 00:00:00 2001 From: Alexander Leidinger Date: Sun, 7 Aug 2005 13:47:25 +0000 Subject: [PATCH] Remove cat-pages without corresponding man-pages. --- Makefile.inc1 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index c7a52f26661d..56f1418c31ff 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1082,6 +1082,17 @@ delete-old-files: && chflags noschg "${DESTDIR}/${file}" \ && rm ${RM_I} "${DESTDIR}/${file}")) .endfor +# Remove catpages without corresponding manpages. + @for dir in ${DESTDIR}/usr/share/man/cat*; do \ + for catpage in $${dir}/*; do \ + manpage=$$(echo $${catpage} \ + | sed 's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:') \ + check_empty=$$(echo $${catpage} \ + | sed 's:.*\*:empty:'); \ + [ $${check_empty} != empty -a ! -e $${manpage} ] \ + && rm ${RM_I} $${catpage} || true; \ + done; \ + done @echo ">>> Old files removed" check-old-files: @@ -1089,6 +1100,17 @@ check-old-files: .for file in ${OLD_FILES} @[ ! -f "${DESTDIR}/${file}" ] || echo "${DESTDIR}/${file}" .endfor +# Check for catpages without corresponding manpages. + @for dir in ${DESTDIR}/usr/share/man/cat*; do \ + for catpage in $${dir}/*; do \ + manpage=$$(echo $${catpage} \ + | sed 's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:'); \ + check_empty=$$(echo $${catpage} \ + | sed 's:.*\*:empty:'); \ + [ $${check_empty} != empty -a ! -e $${manpage} ] \ + && echo $${catpage} || true; \ + done; \ + done delete-old-libs: @echo ">>> Removing old libraries"