From 86e7d291685edb47b3e1a52ef0b1c74976164fb9 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 16 Feb 2021 11:03:15 +0100 Subject: [PATCH] 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 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 328418e8e..ea31eab80 100644 --- a/Makefile +++ b/Makefile @@ -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