forked from rougier/matplotlib-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (26 loc) · 874 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
MAKE = /usr/bin/make
RST2HTML = rst2html.py
RST2LATEX = rst2latex.py
STYLESHEET = dana.css
RST2HTML_OPTIONS = --strip-comments \
--report=3 \
--stylesheet=$(STYLESHEET) \
--link-stylesheet
RST2LATEX_OPTIONS = --strip-comments \
--report=3 \
--use-latex-toc
SOURCES = $(wildcard *.rst)
HTML_OBJECTS = $(subst .rst,.html, $(SOURCES))
LATEX_OBJECTS = $(subst .rst,.tex, $(SOURCES))
html: $(HTML_OBJECTS)
latex: $(LATEX_OBJECTS)
%.html: %.rst Makefile
@echo " - $@"
@$(RST2HTML) $(RST2HTML_OPTIONS) $< $@
%.tex: %.rst Makefile
@echo " - $@"
@$(RST2LATEX) $(RST2LATEX_OPTIONS) $< $@
clean:
@-rm -f $(LATEX_OBJECTS) $(HTML_OBJECTS)
distclean: clean
@-rm -f `find . -name "*~"`