Makefile: Fix html target bug

Switching into the man? subdirectories when running man2html(1)
caused a bug where ".so dir/page.n" links were misinterpreted
(because the directory prefix was interpreted with respect to
the current directory)i, and consequently, the link files
were not correctly rendered. There's no need to switch into the
subdirectories.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2021-02-16 11:03:15 +01:00
parent 106843a6b7
commit 86e7d29168
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ html:
for i in man?; do \
[ -d $(HTDIR)/"$$i" ] || mkdir -p $(HTDIR)/"$$i"; \
find "$$i/" -type f | while read f; do \
(cd "$$i"; man2html $(HTOPTS) `basename $$f`) | \
man2html $(HTOPTS) $$f | \
sed -e '1,2d' > $(HTDIR)/"$$i"/`basename $$f`.html; \
done; \
done; fi