diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-24 04:52:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-24 04:52:24 +0000 |
commit | 100d1b33f088fd38f69129afff7f9c2a1e084a57 (patch) | |
tree | 5bf6b0bb14f22ecf0a5e9439fdd4c4758402400c /share/mk/build/pdf | |
parent | Releasing progress-linux version 6.7-2~progress7.99u1. (diff) | |
download | manpages-100d1b33f088fd38f69129afff7f9c2a1e084a57.tar.xz manpages-100d1b33f088fd38f69129afff7f9c2a1e084a57.zip |
Merging upstream version 6.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | share/mk/build/pdf/_.mk | 2 | ||||
-rw-r--r-- | share/mk/build/pdf/book/_.mk | 51 | ||||
-rw-r--r-- | share/mk/build/pdf/book/front.roff (renamed from scripts/LinuxManBook/LMBfront.roff) | 0 | ||||
-rwxr-xr-x | share/mk/build/pdf/book/prepare.pl (renamed from scripts/LinuxManBook/prepare.pl) | 12 | ||||
-rw-r--r-- | share/mk/build/pdf/gropdf.mk | 25 | ||||
-rw-r--r-- | share/mk/build/pdf/pages/_.mk | 13 | ||||
-rw-r--r-- | share/mk/build/pdf/pages/eqn.mk (renamed from share/mk/build/pdf/eqn.mk) | 12 | ||||
-rw-r--r-- | share/mk/build/pdf/pages/gropdf.mk | 25 | ||||
-rw-r--r-- | share/mk/build/pdf/pages/troff.mk (renamed from share/mk/build/pdf/troff.mk) | 30 |
9 files changed, 120 insertions, 50 deletions
diff --git a/share/mk/build/pdf/_.mk b/share/mk/build/pdf/_.mk index f6660aa..65083a0 100644 --- a/share/mk/build/pdf/_.mk +++ b/share/mk/build/pdf/_.mk @@ -7,7 +7,7 @@ MAKEFILE_BUILD_PDF_INCLUDED := 1 .PHONY: build-pdf -build-pdf: build-pdf-gropdf; +build-pdf: build-pdf-book build-pdf-pages; endif # include guard diff --git a/share/mk/build/pdf/book/_.mk b/share/mk/build/pdf/book/_.mk new file mode 100644 index 0000000..03595f6 --- /dev/null +++ b/share/mk/build/pdf/book/_.mk @@ -0,0 +1,51 @@ +# Copyright 2023-2024, Alejandro Colomar <alx@kernel.org> +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_BUILD_PDF_BOOK_INCLUDED +MAKEFILE_BUILD_PDF_BOOK_INCLUDED := 1 + + +include $(MAKEFILEDIR)/build/_.mk +include $(MAKEFILEDIR)/build/man/_.mk +include $(MAKEFILEDIR)/build/fonts/_.mk +include $(MAKEFILEDIR)/build/fonts/tinos/_.mk +include $(MAKEFILEDIR)/configure/build-depends/coreutils/cat.mk +include $(MAKEFILEDIR)/configure/build-depends/groff/gropdf.mk +include $(MAKEFILEDIR)/configure/build-depends/groff-base/eqn.mk +include $(MAKEFILEDIR)/configure/build-depends/groff-base/pic.mk +include $(MAKEFILEDIR)/configure/build-depends/groff-base/preconv.mk +include $(MAKEFILEDIR)/configure/build-depends/groff-base/tbl.mk +include $(MAKEFILEDIR)/configure/build-depends/groff-base/troff.mk +include $(MAKEFILEDIR)/configure/build-depends/moreutils/sponge.mk +include $(MAKEFILEDIR)/configure/version.mk + + +MKBOOKDIR := $(MAKEFILEDIR)/build/pdf/book +MKBOOK := $(wildcard $(MKBOOKDIR)/*) + + +PDF_BOOK := $(DISTNAME).pdf +_PDFDIR := $(builddir) +_PDF_BOOK := $(_PDFDIR)/$(PDF_BOOK) + + +$(_PDF_BOOK): $(_MANPAGES) $(_DOWNLOAD) $(_TINOS) $(MKBOOK) $(MK) | $$(@D)/ + $(info $(INFO_)GROPDF $@) + $(MKBOOKDIR)/prepare.pl $(_MANDIR) \ + | $(CAT) $(MKBOOKDIR)/front.roff /dev/stdin \ + | $(PRECONV) \ + | $(PIC) \ + | $(TBL) \ + | $(EQN) -Tpdf \ + | $(TROFF) -mandoc -Tpdf -F$(_FONTSDIR) -dpaper=a4 -rC1 \ + -ran*bookmark-base-level=1 $(TROFFFLAGS) \ + | $(GROPDF) -F$(_FONTSDIR) -pa4 $(GROPDFFLAGS) \ + | $(SPONGE) $@ + + +.PHONY: build-pdf-book +build-pdf-book: $(_PDF_BOOK); + + +endif # include guard diff --git a/scripts/LinuxManBook/LMBfront.roff b/share/mk/build/pdf/book/front.roff index fdf1a98..fdf1a98 100644 --- a/scripts/LinuxManBook/LMBfront.roff +++ b/share/mk/build/pdf/book/front.roff diff --git a/scripts/LinuxManBook/prepare.pl b/share/mk/build/pdf/book/prepare.pl index 735cfcf..a074082 100755 --- a/scripts/LinuxManBook/prepare.pl +++ b/share/mk/build/pdf/book/prepare.pl @@ -49,9 +49,10 @@ my $dir2=$dir; $dir2=~tr[.][_]; my %files; my %aliases; -my %target; -foreach my $al (`grep -E '^\\.so' $dir/man*/*`) +foreach my $al (`find "$dir"/man*/ -type f \\ + | grep "\\.[[:digit:]]\\([[:alpha:]][[:alnum:]]*\\)\\?\\>\$" \\ + | xargs grep '^\\.so' /dev/null;`) { #$al=~tr[.][_]; $al=~m/^$dir\/man\d[a-z]*\/(.*):\.\s*so\s*man\d[a-z]*\/(.*)/o; @@ -66,8 +67,11 @@ while (my ($k,$v)=each %aliases) } } -foreach my $fn (glob "$dir/man*/*") +foreach my $fn (`find "$dir"/man*/ -type f \\ + | grep "\\.[[:digit:]]\\([[:alpha:]][[:alnum:]]*\\)\\?\\>\$";`) { + $fn=~s/\n//; + my ($nm,$sec)=GetNmSec($fn,qr/\.\d[a-z]*/); $files{"${nm}.$sec"}=[$fn,(exists($aliases{"${nm}.$sec"}))?$aliases{"${nm}.$sec"}:"${nm}.$sec"]; } @@ -78,7 +82,7 @@ BuildBook(); sub BuildBook { - print ".pdfpagenumbering D . 1\n.nr PDFOUTLINE.FOLDLEVEL 0\n.defcolor pdf:href.colour rgb 0.00 0.25 0.75\n.pdfinfo /Title \"The Linux man-pages Book\"\n.special TINOR S\n"; + print ".pdfpagenumbering D . 1\n.nr PDFOUTLINE.FOLDLEVEL 0\n.defcolor pdf:href.colour rgb 0.00 0.25 0.75\n.pdfinfo /Title \"The Linux man-pages Book\"\n.special TinosR S\n"; foreach my $bkmark (sort sortman keys %files) { BuildPage($bkmark); diff --git a/share/mk/build/pdf/gropdf.mk b/share/mk/build/pdf/gropdf.mk deleted file mode 100644 index 0913122..0000000 --- a/share/mk/build/pdf/gropdf.mk +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org> -# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception - - -ifndef MAKEFILE_BUILD_PDF_GROPDF_INCLUDED -MAKEFILE_BUILD_PDF_GROPDF_INCLUDED := 1 - - -include $(MAKEFILEDIR)/build/pdf/troff.mk -include $(MAKEFILEDIR)/configure/build-depends/groff.mk - - -_PDFMAN := $(patsubst %.pdf.set,%.pdf,$(_PDFMAN_MAN_set) $(_PDFMAN_MDOC_set)) - - -$(_PDFMAN): %.pdf: %.pdf.set $(MK) | $$(@D)/ - $(info $(INFO_)GROPDF $@) - $(GROPDF) $(GROPDFFLAGS) <$< >$@ - - -.PHONY: build-pdf-gropdf -build-pdf-gropdf: $(_PDFMAN); - - -endif # include guard diff --git a/share/mk/build/pdf/pages/_.mk b/share/mk/build/pdf/pages/_.mk new file mode 100644 index 0000000..0885039 --- /dev/null +++ b/share/mk/build/pdf/pages/_.mk @@ -0,0 +1,13 @@ +# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org> +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_BUILD_PDF_PAGES_INCLUDED +MAKEFILE_BUILD_PDF_PAGES_INCLUDED := 1 + + +.PHONY: build-pdf-pages +build-pdf-pages: build-pdf-pages-gropdf; + + +endif # include guard diff --git a/share/mk/build/pdf/eqn.mk b/share/mk/build/pdf/pages/eqn.mk index bb0598b..aedf4cf 100644 --- a/share/mk/build/pdf/eqn.mk +++ b/share/mk/build/pdf/pages/eqn.mk @@ -2,13 +2,13 @@ # SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception -ifndef MAKEFILE_BUILD_PDF_EQN_INCLUDED -MAKEFILE_BUILD_PDF_EQN_INCLUDED := 1 +ifndef MAKEFILE_BUILD_PDF_PAGES_EQN_INCLUDED +MAKEFILE_BUILD_PDF_PAGES_EQN_INCLUDED := 1 include $(MAKEFILEDIR)/build/pre/tbl.mk -include $(MAKEFILEDIR)/configure/build-depends/grep.mk -include $(MAKEFILEDIR)/configure/build-depends/groff-base.mk +include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk +include $(MAKEFILEDIR)/configure/build-depends/groff-base/eqn.mk _PDFMAN_troff := $(patsubst %.eqn,%.pdf.troff,$(_MAN_eqn)) @@ -20,8 +20,8 @@ $(_PDFMAN_troff): %.pdf.troff: %.eqn $(MK) | $$(@D)/ | $(GREP) ^ >&2 -.PHONY: build-pdf-eqn -build-pdf-eqn: $(_PDFMAN_troff); +.PHONY: build-pdf-pages-eqn +build-pdf-pages-eqn: $(_PDFMAN_troff); endif # include guard diff --git a/share/mk/build/pdf/pages/gropdf.mk b/share/mk/build/pdf/pages/gropdf.mk new file mode 100644 index 0000000..39aa61a --- /dev/null +++ b/share/mk/build/pdf/pages/gropdf.mk @@ -0,0 +1,25 @@ +# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org> +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_BUILD_PDF_PAGES_GROPDF_INCLUDED +MAKEFILE_BUILD_PDF_PAGES_GROPDF_INCLUDED := 1 + + +include $(MAKEFILEDIR)/build/pdf/pages/troff.mk +include $(MAKEFILEDIR)/configure/build-depends/groff/gropdf.mk + + +_PDFMAN := $(patsubst %.pdf.set, %.pdf, $(_PDFMAN_MAN_set) $(_PDFMAN_MDOC_set)) + + +$(_PDFMAN): %.pdf: %.pdf.set $(MK) | $$(@D)/ + $(info $(INFO_)GROPDF $@) + $(GROPDF) $(GROPDFFLAGS) <$< >$@ + + +.PHONY: build-pdf-pages-gropdf +build-pdf-pages-gropdf: $(_PDFMAN); + + +endif # include guard diff --git a/share/mk/build/pdf/troff.mk b/share/mk/build/pdf/pages/troff.mk index 5254d5d..dacfdb0 100644 --- a/share/mk/build/pdf/troff.mk +++ b/share/mk/build/pdf/pages/troff.mk @@ -2,21 +2,23 @@ # SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception -ifndef MAKEFILE_BUILD_PDF_TROFF_INCLUDED -MAKEFILE_BUILD_PDF_TROFF_INCLUDED := 1 +ifndef MAKEFILE_BUILD_PDF_PAGES_TROFF_INCLUDED +MAKEFILE_BUILD_PDF_PAGES_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)/build/man/man.mk +include $(MAKEFILEDIR)/build/man/mdoc.mk +include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk +include $(MAKEFILEDIR)/configure/build-depends/groff-base/troff.mk include $(MAKEFILEDIR)/configure/xfail.mk -include $(MAKEFILEDIR)/src.mk _XFAIL_PDFMAN_MAN_set := \ $(_MANDIR)/man1/iconv.1.pdf.set \ $(_MANDIR)/man2/fanotify_init.2.pdf.set \ + $(_MANDIR)/man2/membarrier.2.pdf.set \ + $(_MANDIR)/man2/statx.2.pdf.set \ $(_MANDIR)/man2/syscall.2.pdf.set \ $(_MANDIR)/man3/newlocale.3.pdf.set \ $(_MANDIR)/man7/address_families.7.pdf.set \ @@ -42,8 +44,8 @@ _XFAIL_PDFMAN_MAN_set := \ $(_MANDIR)/man7/vdso.7.pdf.set -_PDFMAN_MAN_set := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.pdf.set,$(NONSO_MAN)) -_PDFMAN_MDOC_set := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.pdf.set,$(NONSO_MDOC)) +_PDFMAN_MAN_set := $(patsubst %, %.pdf.set, $(_NONSO_MAN)) +_PDFMAN_MDOC_set := $(patsubst %, %.pdf.set, $(_NONSO_MDOC)) ifeq ($(SKIP_XFAIL),yes) @@ -62,14 +64,14 @@ $(_PDFMAN_MDOC_set): %.pdf.set: %.pdf.troff $(MK) | $$(@D)/ | $(GREP) ^ >&2 -.PHONY: build-pdf-troff-man -build-pdf-troff-man: $(_PDFMAN_MAN_set); +.PHONY: build-pdf-pages-troff-man +build-pdf-pages-troff-man: $(_PDFMAN_MAN_set); -.PHONY: build-pdf-troff-mdoc -build-pdf-troff-mdoc: $(_PDFMAN_MDOC_set); +.PHONY: build-pdf-pages-troff-mdoc +build-pdf-pages-troff-mdoc: $(_PDFMAN_MDOC_set); -.PHONY: build-pdf-troff -build-pdf-troff: build-pdf-troff-man build-pdf-troff-mdoc; +.PHONY: build-pdf-pages-troff +build-pdf-pages-troff: build-pdf-pages-troff-man build-pdf-pages-troff-mdoc; endif # include guard |