-
Notifications
You must be signed in to change notification settings - Fork 213
/
Makefile
49 lines (41 loc) · 1.03 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Generate a single PDF, ePub or HTML from the Markdown source files
#
# In order to use this makefile, you need some tools:
# - GNU make
# - Pandoc
# - LaTeX (texlive-core, texlive-fontsextra)
# Output directory and filename
BUILD = build
OUTPUT_FILENAME = Documentation
# Additional Metadata
METADATA = metadata.yml
# Source for the document
SOURCE = $(shell ls src/*.md)
# Combine all the arguments
ARGS = --from markdown \
--toc \
--toc-depth=2 \
--template="./templates/eisvogel.tex" \
--variable subparagraph \
-f markdown-implicit_figures \
-V papersize:a4 \
-V book \
-V classoption=oneside \
--top-level-division=chapter \
--pdf-engine=xelatex \
--highlight-style breezedark \
--citeproc \
--csl=bibliography.csl \
--listings
# Default task
all: clean pdf
# Build tasks for individual formats
pdf: $(BUILD)/$(OUTPUT_FILENAME).pdf
# Clean the build directory
.PHONY : clean
clean:
rm -r $(BUILD)
# Build a pdf
$(BUILD)/$(OUTPUT_FILENAME).pdf: $(METADATA) $(SOURCE)
mkdir -p $(BUILD)
pandoc $(ARGS) -o $@ $^