aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 02755463446bb85b411bd202825693f9120920ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
LATEXMK = latexmk -cd -pdf -interaction=nonstopmode

MANUAL_ROOT = assets/manual

LUA_SRCS = $(wildcard advtrains*/*.lua)

TEX_PATH = $(MANUAL_ROOT)/tex
TEX_ALL_SRCS = $(wildcard $(TEX_PATH)/*.tex)
TEX_MAIN_SRCS = $(wildcard $(TEX_PATH)/*manual.tex)
TEX_MAIN_DSTS = $(TEX_MAIN_SRCS:%.tex=%.pdf)

all: doc

doc: doc-pdf doc-ldoc

doc-pdf: $(TEX_MAIN_DSTS)
%.pdf:: %.tex $(TEX_ALL_SRCS)
	$(LATEXMK) $<

doc-ldoc:: $(LUA_SRCS)
	ldoc .
	tar cJf assets/manual/ldoc.tar.xz -C assets/manual/ldoc_output .