]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
*.mk: build-book: Add target for building the Linux Man Book
authorAlejandro Colomar <alx@kernel.org>
Fri, 1 Dec 2023 13:51:44 +0000 (14:51 +0100)
committerAlejandro Colomar <alx@kernel.org>
Fri, 1 Dec 2023 13:51:44 +0000 (14:51 +0100)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
GNUmakefile
share/mk/build/_.mk
share/mk/build/book.mk [new file with mode: 0644]

index 0d80842968bfb13a9cae912fd4c5a5e13abaf4d2..123419426d864fba4ee26256d95725a51f1682c4 100644 (file)
@@ -46,6 +46,8 @@ help:
        $(info  )
        $(info  build                   Wrapper for build-* targets)
        $(info  )
+       $(info  build-book              Build the Linux Man Book (PDF))
+       $(info  )
        $(info  build-pre               Preprocess man pages; alias for "build-pre-tbl")
        $(info  build-pre-preconv       Preprocess man pages with preconv(1))
        $(info  build-pre-tbl           Preprocess man pages with tbl(1))
index 5e3b36587b23c76695e60103cc9d1a672f82be1f..f812b21b42d8f0bda0e965ca78978e1ab6984848 100644 (file)
@@ -41,7 +41,7 @@ $(builddir)/%/:
 
 
 .PHONY: build
-build: build-catman build-html build-pdf build-ps build-src;
+build: build-book build-catman build-html build-pdf build-ps build-src;
 
 .PHONY: clean
 clean:
diff --git a/share/mk/build/book.mk b/share/mk/build/book.mk
new file mode 100644 (file)
index 0000000..d16b810
--- /dev/null
@@ -0,0 +1,31 @@
+########################################################################
+# Copyright 2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_BUILD_BOOK_INCLUDED
+MAKEFILE_BUILD_BOOK_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/src.mk
+
+
+LMBDIR   := $(srcdir)/scripts/LinuxManBook
+BUILDLMB := $(LMBDIR)/build.sh
+
+
+_LMB     := $(_MANDIR)/man-pages.pdf
+
+
+$(_LMB): $(MANPAGES) $(wildcard $(LMBDIR)/* $(LMBDIR)/*/*) | $$(@D)/
+       $(info  Build   $@)
+       $(BUILDLMB) $(MANDIR) >$@
+
+
+.PHONY: build-book
+build-book: $(_LMB);
+
+
+endif  # include guard