forked from bigcompany/know-your-http
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
43 lines (33 loc) · 1023 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
PDFS = headers.pdf methods.pdf status-codes.pdf status-codes.zh-CN.pdf methods.zh-CN.pdf
THUMBS = thumbnails/headers.png thumbnails/methods.png thumbnails/status-codes.png thumbnails/status-codes.zh-CN.png thumbnails/methods.zh-CN.png
SCREENSHOTS = screenshots/status-codes.zh-CN.png screenshots/methods.zh-CN.png
all: pdfs thumbs screens
pdfs: $(PDFS)
thumbs: $(THUMBS)
screens: $(SCREENSHOTS)
clean:
@echo "# Cleaning up..."
rm -f *.aux
rm -f *.log
rm -f *.nav
rm -f *.out
rm -f $(PDFS)
rm -f $(PNGS)
rm -rf thumbnails
rm -rf screenshots
rm -f *.snm
rm -f *.toc
%.pdf: %.tex
@echo "# Generating $@ from $<..."
xelatex -shell-escape -interaction=nonstopmode -halt-on-error $<
xelatex -shell-escape -interaction=nonstopmode -halt-on-error $<
thumbnails:
@mkdir -p thumbnails
thumbnails/%.png: %.pdf thumbnails
@echo "# Generating $@ from $<..."
convert $< -resize x200 $@
screenshots:
@mkdir -p screenshots
screenshots/%.png: %.pdf screenshots
@echo "# Generating $@ from $<..."
convert $< $@