From: Alejandro Colomar Date: Fri, 1 Dec 2023 13:51:44 +0000 (+0100) Subject: *.mk: build-book: Add target for building the Linux Man Book X-Git-Tag: man-pages-6.06~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d080b047881e19a8df2f962d0af4abfe7024665d;p=thirdparty%2Fman-pages.git *.mk: build-book: Add target for building the Linux Man Book Signed-off-by: Alejandro Colomar --- diff --git a/GNUmakefile b/GNUmakefile index 0d80842968..123419426d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -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)) diff --git a/share/mk/build/_.mk b/share/mk/build/_.mk index 5e3b36587b..f812b21b42 100644 --- a/share/mk/build/_.mk +++ b/share/mk/build/_.mk @@ -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 index 0000000000..d16b8104c9 --- /dev/null +++ b/share/mk/build/book.mk @@ -0,0 +1,31 @@ +######################################################################## +# Copyright 2023, Alejandro Colomar +# 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