From 3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:41:07 +0200 Subject: Merging upstream version 6.7. Signed-off-by: Daniel Baumann --- share/mk/build/html/_.mk | 13 +++++++++ share/mk/build/html/post-grohtml.mk | 25 ++++++++++++++++ share/mk/build/html/troff.mk | 58 +++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 share/mk/build/html/_.mk create mode 100644 share/mk/build/html/post-grohtml.mk create mode 100644 share/mk/build/html/troff.mk (limited to 'share/mk/build/html') diff --git a/share/mk/build/html/_.mk b/share/mk/build/html/_.mk new file mode 100644 index 0000000..b3e3041 --- /dev/null +++ b/share/mk/build/html/_.mk @@ -0,0 +1,13 @@ +# Copyright 2021-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_BUILD_HTML_INCLUDED +MAKEFILE_BUILD_HTML_INCLUDED := 1 + + +.PHONY: build-html +build-html: build-html-post-grohtml; + + +endif # include guard diff --git a/share/mk/build/html/post-grohtml.mk b/share/mk/build/html/post-grohtml.mk new file mode 100644 index 0000000..fe77776 --- /dev/null +++ b/share/mk/build/html/post-grohtml.mk @@ -0,0 +1,25 @@ +# Copyright 2021-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_BUILD_HTML_POST_GROHTML_INCLUDED +MAKEFILE_BUILD_HTML_POST_GROHTML_INCLUDED := 1 + + +include $(MAKEFILEDIR)/build/html/troff.mk +include $(MAKEFILEDIR)/configure/build-depends/groff.mk + + +_HTMLMAN := $(patsubst %.html.set,%.html,$(_HTMLMAN_MAN_set) $(_HTMLMAN_MDOC_set)) + + +$(_HTMLMAN): %.html: %.html.set $(MK) | $$(@D)/ + $(info $(INFO_)POST_GROHTML $@) + $(POST_GROHTML) $(POST_GROHTMLFLAGS) <$< >$@ + + +.PHONY: build-html-post-grohtml +build-html-post-grohtml: $(_HTMLMAN); + + +endif # include guard diff --git a/share/mk/build/html/troff.mk b/share/mk/build/html/troff.mk new file mode 100644 index 0000000..010c211 --- /dev/null +++ b/share/mk/build/html/troff.mk @@ -0,0 +1,58 @@ +# Copyright 2021-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_BUILD_HTML_TROFF_INCLUDED +MAKEFILE_BUILD_HTML_TROFF_INCLUDED := 1 + + +include $(MAKEFILEDIR)/build/_.mk +include $(MAKEFILEDIR)/configure/build-depends/grep.mk +include $(MAKEFILEDIR)/configure/build-depends/groff-base.mk +include $(MAKEFILEDIR)/configure/src.mk +include $(MAKEFILEDIR)/configure/xfail.mk +include $(MAKEFILEDIR)/src.mk + + +_XFAIL_HTMLMAN_MAN_set := \ + $(_MANDIR)/man2/fanotify_init.2.html.set \ + $(_MANDIR)/man2/membarrier.2.html.set \ + $(_MANDIR)/man5/proc.5.html.set \ + $(_MANDIR)/man7/bpf-helpers.7.html.set \ + $(_MANDIR)/man7/charsets.7.html.set \ + $(_MANDIR)/man7/iso_8859-16.7.html.set \ + $(_MANDIR)/man7/iso_8859-6.7.html.set \ + $(_MANDIR)/man8/zic.8.html.set + + +_HTMLMAN_MAN_set := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.html.set,$(NONSO_MAN)) +_HTMLMAN_MDOC_set:= $(patsubst $(MANDIR)/%,$(_MANDIR)/%.html.set,$(NONSO_MDOC)) + + +ifeq ($(SKIP_XFAIL),yes) +_HTMLMAN_MAN_set := $(filter-out $(_XFAIL_HTMLMAN_MAN_set), $(_HTMLMAN_MAN_set)) +endif + + +$(_HTMLMAN_MAN_set): %.html.set: %.eqn $(MK) | $$(@D)/ + $(info $(INFO_)TROFF $@) + ! ($(TROFF) -man -Thtml $(TROFFFLAGS) <$< 2>&1 >$@) \ + | $(GREP) ^ >&2 + +$(_HTMLMAN_MDOC_set): %.html.set: %.eqn $(MK) | $$(@D)/ + $(info $(INFO_)TROFF $@) + ! ($(TROFF) -mdoc -Thtml $(TROFFFLAGS) <$< 2>&1 >$@) \ + | $(GREP) ^ >&2 + + +.PHONY: build-html-troff-man +build-html-troff-man: $(_HTMLMAN_MAN_set); + +.PHONY: build-html-troff-mdoc +build-html-troff-mdoc: $(_HTMLMAN_MDOC_set); + +.PHONY: build-html-troff +build-html-troff: build-html-troff-man build-html-troff-mdoc; + + +endif # include guard -- cgit v1.2.3