diff options
author | Y. Wang <yw05@forksworld.de> | 2022-08-12 08:13:48 +0200 |
---|---|---|
committer | Y. Wang <yw05@forksworld.de> | 2022-08-12 08:13:48 +0200 |
commit | 2d2f3dd466ef8c3b3af40074e8991de36be60407 (patch) | |
tree | ba09446e58a64c77530055f59bfbd340303acef4 /Makefile | |
parent | b4ac74c41911ee7771e88da91208c1eb16c4b752 (diff) | |
download | advtrains-2d2f3dd466ef8c3b3af40074e8991de36be60407.tar.gz advtrains-2d2f3dd466ef8c3b3af40074e8991de36be60407.tar.bz2 advtrains-2d2f3dd466ef8c3b3af40074e8991de36be60407.zip |
\include manpage .tex files
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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) |