diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:40:15 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:40:15 +0000 |
commit | 399644e47874bff147afb19c89228901ac39340e (patch) | |
tree | 1c4c0b733f4c16b5783b41bebb19194a9ef62ad1 /share/mk/build/html.mk | |
parent | Initial commit. (diff) | |
download | manpages-399644e47874bff147afb19c89228901ac39340e.tar.xz manpages-399644e47874bff147afb19c89228901ac39340e.zip |
Adding upstream version 6.05.01.upstream/6.05.01
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/mk/build/html.mk')
-rw-r--r-- | share/mk/build/html.mk | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/share/mk/build/html.mk b/share/mk/build/html.mk new file mode 100644 index 0000000..084654d --- /dev/null +++ b/share/mk/build/html.mk @@ -0,0 +1,42 @@ +######################################################################## +# Copyright 2021-2022, Alejandro Colomar <alx@kernel.org> +# SPDX-License-Identifier: GPL-3.0-or-later +######################################################################## + + +ifndef MAKEFILE_BUILD_HTML_INCLUDED +MAKEFILE_BUILD_HTML_INCLUDED := 1 + + +include $(MAKEFILEDIR)/build/_.mk +include $(MAKEFILEDIR)/cmd.mk +include $(MAKEFILEDIR)/src.mk + + +htmlext := .html +_HTMLDIR := $(builddir)/html + + +DEFAULT_MAN2HTMLFLAGS := +EXTRA_MAN2HTMLFLAGS := +MAN2HTMLFLAGS := $(DEFAULT_MAN2HTMLFLAGS) $(EXTRA_MAN2HTMLFLAGS) +MAN2HTML := man2html + + +_HTMLPAGES := $(patsubst $(MANDIR)/%,$(_HTMLDIR)/%$(htmlext),$(MANPAGES)) + + +# Use with +# make MAN2HTMLFLAGS=whatever html +# The sed removes the lines "Content-type: text/html\n\n" +$(_HTMLPAGES): $(_HTMLDIR)/%$(htmlext): $(MANDIR)/% | $$(@D)/ + $(info MAN2HTML $@) + $(MAN2HTML) $(MAN2HTMLFLAGS) $< \ + | $(SED) -e 1,2d >$@ + + +.PHONY: build-html html +build-html html: $(_HTMLPAGES); + + +endif # include guard |