aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorY. Wang <yw05@forksworld.de>2022-08-10 14:33:33 +0200
committerY. Wang <yw05@forksworld.de>2022-08-10 14:33:33 +0200
commit48b9922071c6e338a3ab6ebdea01fc57940cd7f8 (patch)
tree2605f59e93b3dd51ad92019c3d39f919ed742cf4 /Makefile
parent80f2f33bfb2b9bf8d38db86aa7b1a982fd7a548d (diff)
downloadadvtrains-48b9922071c6e338a3ab6ebdea01fc57940cd7f8.tar.gz
advtrains-48b9922071c6e338a3ab6ebdea01fc57940cd7f8.tar.bz2
advtrains-48b9922071c6e338a3ab6ebdea01fc57940cd7f8.zip
Add "SEE ALSO" section to manual pages where applicable
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 7beb1fc..ba1a371 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,7 @@ MAN_PATH = $(MANUAL_ROOT)/man
MAN_SRCS = $(wildcard $(MAN_PATH)/*/*.md)
MAN_DSTS = $(MAN_SRCS:%.md=%)
MAN_TEXS = $(MAN_SRCS:%.md=%.tex)
+MAN_FILTER = $(MANUAL_ROOT)/filter_man.lua
TEX_PATH = $(MANUAL_ROOT)/tex
MAN_TEX = $(TEX_PATH)/man.tex
@@ -26,11 +27,11 @@ doc-pdf: $(TEX_MAIN_DSTS)
doc-man: $(MAN_DSTS)
find assets/manual/man -regex '.*/[^.]+\.[^.]+$$' | tar -cJf ${MANUAL_ROOT}/man.tar.xz -T -
-%:: %.md
- $(PANDOC) -s -t man -o $@ $<
+%:: %.md ${MAN_FILTER}
+ $(PANDOC) -L ${MAN_FILTER} -s -t man -o $@ $<
$(MAN_TEX): $(MAN_TEXS)
find $(MAN_PATH) -name '*.tex' -printf '\\input{../man/%P}\n' | sort > $(MAN_TEX)
-%.tex:: %.md ${MANUAL_ROOT}/filter_man_md2tex.lua
- $(PANDOC) -L ${MANUAL_ROOT}/filter_man_md2tex.lua -t latex -o $@ $<
+%.tex:: %.md ${MAN_FILTER}
+ $(PANDOC) -L ${MAN_FILTER} -t latex -o $@ $<