summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2021-03-30 18:18:44 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2021-03-30 18:18:44 +0200
commit3acf2b4b917024eeda167aff6cb7035d23ea2b81 (patch)
treeb509ff8f07c2425eb95a5b9e3c70930e39c4f12b
parent133870c813d5f607de20bc24c789c3cd143318b4 (diff)
Makefile: Some manual pages use suffixes in projects, such as man3p
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 64faee0..92945f7 100644
--- a/Makefile
+++ b/Makefile
@@ -87,18 +87,21 @@ submodules:
.PHONY: html
html: | builddirs-html
cd $(MANDIR_)/ && \
- find man?/ -type f \
+ find man*/ -type f \
|while read f; do \
+ _d=$$(dirname $$f | sed -E 's/(man.).*/\1/'); \
+ _f=$$(basename $$f); \
man2html -r "$$f" \
|sed -e '1,2d' \
- >"$(htmlbuilddir)/$${f}$(htmlext)" \
+ >"$(htmlbuilddir)/$$_d/$${_f}$(htmlext)" \
|| exit $$?; \
done;
.PHONY: builddirs-html
builddirs-html:
cd $(MANDIR_)/ && \
- find man?/ -type d \
+ find man*/ -type d \
+ |sed -E 's/(man.).*/\1/' \
|while read d; do \
$(INSTALL_DIR) "$(htmlbuilddir)/$$d" || exit $$?; \
done;