-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
41 lines (27 loc) · 745 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
#tex stuff
TEX = $(wildcard *.tex)
PDF = $(UI:.tex=.pdf)
SLAG = $(wildcard *.out *.log *.aux *.nav *.snm *.toc) $(HTMLTARGET)
#landslide stuff
RST=$(wildcard *.rst)
HTMLTARGET = $(RST:.rst=.html)
#hack to cope with trailing spaces on src files
TRAILING=$(TEX:.tex=.tex.trailing) $(RST:.rst=.rst.trailing)
all: $(PDF) $(HTMLTARGET)
clean-build:
-rm $(SLAG) $(TRAILING)
clean: clean-build
trailing-spaces: $(TRAILING)
show: all
see $(HTMLTARGET)
show-chromium: all
chromium $(HTMLTARGET)
%.html: %.rst
landslide -t ./themes/mytheme -i $< -d $@
$(PDF): $(TEX)
%.pdf: %.tex
pdflatex $<
%.trailing: %
sed -i 's/[ \t]*$$//' $<
touch $@ # stamp to avoid re seding
@echo Removal of trailing spaces: should be taken care of by vim.