forked from nathangrigg/vimhelppdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (38 loc) · 916 Bytes
/
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
define TASKS
letter make letter-sized version
a4 make a4-sized version
ipad make ipad-sized version
all make all versions
update update vim help and vim-faq from repository
clean delete intermediate files
clobber delete all files
endef
export TASKS
SHELL=/bin/bash
docdir = doc
helpfiles = $(wildcard $(docdir)/*.txt)
# If you use this you are going to want to do a `make clean` because
# it will mess up the dependencies.
ifeq (no, ${FAQ})
faq := --no-faq
endif
letter: vimhelp.pdf
a4: vimhelp-a4.pdf
ipad: vimhelp-ipad.pdf
all: letter a4 ipad
update:
./update.sh
$(docdir):
./update.sh
%.pdf: %.tex body.tex FORCE
xelatex $<
body.tex: $(helpfiles) $(docdir) contents.txt
python3 h2h.py $(faq)
clean:
-rm body.tex *.log *.aux *.toc *.out
-rm -r $(docdir)
clobber: clean
-rm vimhelp{,-ipad,-a4}.pdf
help:
@echo "$$TASKS"
.PHONY: letter a4 ipad all update help clean clobber FORCE