-
Notifications
You must be signed in to change notification settings - Fork 65
/
Makefile
78 lines (61 loc) · 1.85 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# ----------------
# User commands
# ----------------
LATEXINDENT_ARGS=-l latexindent.yaml -c build -m -r
LATEXMK_ARGS=-halt-on-error -time -xelatex -outdir=build -shell-escape
all: build
prepare:
mkdir -p build
mkdir -p build/contents
# Build latex files in root directory
build: prepare
latexmk main.tex $(LATEXMK_ARGS)
cp build/main.pdf .
# Format tex files in root directory
format:
latexindent main.tex -l latexindent.yaml -w $(LATEXINDENT_ARGS)
# Install the package to TeX Live / MacTeX
# For MiKTeX users, if you encounter `please use --texmfhome option`,
# I wish you could do the job manually by using
# `l3build install --texmfhome path/to/install`.
# For more details, see the development guide.
install:
cd src && l3build install
# Clean temporary files
clean:
latexmk -C $(LATEXMK_ARGS)
# ----------------
# Developer commands
# ----------------
# Format all tex and dtx files
format-dev:
.github/ci/format.sh $(LATEXINDENT_ARGS)
# Clean all temporary files and generated files
clean-dev:
latexmk -C
cd src && l3build clean
git clean -dfX
# Build all covers to `cover.pdf`
build-cover: prepare
.github/ci/gen_cover.sh $(LATEXMK_ARGS)
cp build/cover.pdf .
# Build sjtubeamer package
# This will build online package automatically.
build-dev: prepare
.github/ci/build_package.sh
# Build online distribution
build-online: prepare
.github/ci/build_online.sh
# Build `main.tex` with multiple test variants
build-test-variants: prepare
.github/ci/build_test_variants.sh $(LATEXMK_ARGS)
cp build/build-*.pdf .
# Build `main.tex` with multiple release variants
build-all-variants: prepare
.github/ci/build_all_variants.sh $(LATEXMK_ARGS)
cp build/build-*.pdf .
# Generate `.sty` files and copy resources
generate:
(cd src/source && latex beamerthemesjtubeamer.ins && mv *.sty ../..)
.github/ci/copy_resources.sh
.PHONY: build format clean