]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
share/mk/, scripts/LinuxManBook/build.sh: Embed script in the makefiles
authorAlejandro Colomar <alx@kernel.org>
Sun, 24 Mar 2024 11:55:15 +0000 (12:55 +0100)
committerAlejandro Colomar <alx@kernel.org>
Sun, 24 Mar 2024 12:14:24 +0000 (13:14 +0100)
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 <alx@kernel.org>
scripts/LinuxManBook/build.sh [deleted file]
share/mk/build/book.mk

diff --git a/scripts/LinuxManBook/build.sh b/scripts/LinuxManBook/build.sh
deleted file mode 100755 (executable)
index fcb8b83..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env -Sbash
-# Copyright 2023-2024, Alejandro Colomar <alx@kernel.org>
-# 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;
index 761334fd35d3b3a0f1fdc50c22c8d9ab12e64011..5b2bf0ef6406551c7323ed538da649f3f24f8a18 100644 (file)
@@ -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) $@