Makefile.inc1: Cleanup (un)compressed manpages

When switching between compressed and uncompressed manual pages, the
other type is left behind as divots. Compensate by removing the
now-unwanted man pages automatically.

Reviewed by: imp, jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1295
This commit is contained in:
Ricardo Branco
2024-06-16 20:39:49 +02:00
committed by Warner Losh
parent 4acd63a626
commit f580578877
2 changed files with 38 additions and 4 deletions
+2 -4
View File
@@ -237,11 +237,9 @@ maninstall: ${MAN}
# On MacOS, assume case folding FS, and don't install links from foo.x to FOO.x.
.if ${.MAKE.OS} != "Darwin" || ${l:tu} != ${t:tu}
.if ${MK_MANSPLITPKG} == "no"
rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \
${INSTALL_MANLINK} ${TAG_ARGS} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT}
${INSTALL_MANLINK} ${TAG_ARGS} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT}
.else
rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \
${INSTALL_MANLINK} ${TAG_ARGS:D${TAG_ARGS},man} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT}
${INSTALL_MANLINK} ${TAG_ARGS:D${TAG_ARGS},man} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT}
.endif
.endif
.endfor