From: Alejandro Colomar Date: Sun, 24 Mar 2024 11:55:15 +0000 (+0100) Subject: share/mk/, scripts/LinuxManBook/build.sh: Embed script in the makefiles X-Git-Tag: man-pages-6.8~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e21945517abbffbc4b0daeeb7a54747fa55e059;p=thirdparty%2Fman-pages.git share/mk/, scripts/LinuxManBook/build.sh: Embed script in the makefiles This is done for simplifying, and as a side effect, it also allows much more control on the script (e.g., TROFFFLAGS). Signed-off-by: Alejandro Colomar --- diff --git a/scripts/LinuxManBook/build.sh b/scripts/LinuxManBook/build.sh deleted file mode 100755 index fcb8b8362..000000000 --- a/scripts/LinuxManBook/build.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env -Sbash -# Copyright 2023-2024, Alejandro Colomar -# SPDX-License-Identifier: GPL-3.0-or-later - - -test -v CAT || CAT=cat; -test -v PRECONV || PRECONV=preconv; -test -v PIC || PIC=pic; -test -v TBL || TBL=tbl; -test -v EQN || EQN=eqn; -test -v TROFF || TROFF=troff; -test -v GROPDF || GROPDF=gropdf; - - -( - $CAT "$(dirname "$0")"/LMBfront.roff; - $CAT "$(dirname "$0")"/an.tmac; - "$(dirname "$0")"/prepare.pl "$1"; -) \ -| $PRECONV \ -| $PIC \ -| $TBL \ -| $EQN -Tpdf \ -| $TROFF -Tpdf -F"$(dirname "$0")" -dpaper=a4 \ -| $GROPDF -F"$(dirname "$0")" -pa4; diff --git a/share/mk/build/book.mk b/share/mk/build/book.mk index 761334fd3..5b2bf0ef6 100644 --- a/share/mk/build/book.mk +++ b/share/mk/build/book.mk @@ -20,7 +20,6 @@ include $(MAKEFILEDIR)/configure/version.mk LMBDIR := $(CURDIR)/scripts/LinuxManBook -BUILDLMB := $(LMBDIR)/build.sh BOOK := $(DISTNAME).pdf @@ -29,15 +28,18 @@ _BOOK := $(_BOOKDIR)/$(BOOK) $(_BOOK): $(_MANPAGES) $(wildcard $(LMBDIR)/* $(LMBDIR)/*/*) | $$(@D)/ - $(info $(INFO_)Build $@) - CAT='$(CAT)' \ - PRECONV='$(PRECONV)' \ - PIC='$(PIC)' \ - TBL='$(TBL)' \ - EQN='$(EQN)' \ - TROFF='$(TROFF)' \ - GROPDF='$(GROPDF)' \ - $(BUILDLMB) $(_MANDIR) \ + $(info $(INFO_)GROPDF $@) + ( \ + $(CAT) "$(LMBDIR)"/LMBfront.roff; \ + $(CAT) "$(LMBDIR)"/an.tmac; \ + "$(LMBDIR)"/prepare.pl "$(_MANDIR)"; \ + ) \ + | $(PRECONV) \ + | $(PIC) \ + | $(TBL) \ + | $(EQN) -Tpdf \ + | $(TROFF) -Tpdf -F"$(LMBDIR)" -dpaper=a4 $(TROFFFLAGS) \ + | $(GROPDF) -F"$(LMBDIR)" -pa4 $(GROPDFFLAGS) \ | $(SPONGE) $@