From 2d2f3dd466ef8c3b3af40074e8991de36be60407 Mon Sep 17 00:00:00 2001 From: "Y. Wang" Date: Fri, 12 Aug 2022 08:13:48 +0200 Subject: \include manpage .tex files --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3d05472..41f7af8 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ MAN_TEXS = $(MAN_SRCS:%.md=%.tex) MAN_FILTER = $(MANUAL_ROOT)/filter_man.lua TEX_PATH = $(MANUAL_ROOT)/tex +MAN_TEX_DIR = $(TEX_PATH)/man MAN_TEX = $(TEX_PATH)/man.tex TEX_MAIN_SRCS = $(wildcard $(TEX_PATH)/*manual.tex) TEX_MAIN_DSTS = $(TEX_MAIN_SRCS:%.tex=%.pdf) @@ -21,7 +22,7 @@ all: doc doc: doc-pdf doc-man doc-pdf: $(TEX_MAIN_DSTS) -%.pdf:: %.tex $(MAN_TEX) $(wildcard $(TEX_PATH)/*.tex) +%.pdf: %.tex $(MAN_TEX) $(wildcard $(TEX_PATH)/*.tex) $(LATEXMK) -cd -pdf $< doc-man: $(MAN_DSTS) @@ -31,7 +32,7 @@ doc-man: $(MAN_DSTS) $(PANDOC) -L ${MAN_FILTER} -s -t man -o $@ $< %.tex:: %.md ${MAN_FILTER} - $(PANDOC) -L ${MAN_FILTER} -t latex -o $@ $< + $(PANDOC) -L ${MAN_FILTER} -t latex -o $(MAN_TEX_DIR)/$(notdir $@) $< $(MAN_TEX): $(MAN_TEXS) - find $(MAN_PATH) -name '*.tex' -printf '\\input{../man/%P}\n' | sort > $(MAN_TEX) + find $(MAN_TEX_DIR) -name '*.tex' -printf '\\include{man/%f}\n' | sort | sed '1s/^\\include/\\input/' > $(MAN_TEX) -- cgit v1.2.3