blob: 03595f6850c5d75678d1fc749a9a161f7b7c5506 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
|