Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: becd6c5c8a9f46aa6f093ede2dd2b2d970f2ebba (plain)
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
# This variable's customisable to change the language of the outputted files.
# Permissible values: 'en' or 'es'
LANG = es

PDFS = presentation.pdf handout.pdf
EN_EXERCISES = \
	1_printing-names \
	2_arithmetic \
	3_squares \
	4_fibonacci \
	5_while \
	6_break \
	7_lists \
	8_lists-min \
	9_dicts \
	$(NULL)
ES_EXERCISES = \
	1_imprimir-nombres \
	2_aritmetica \
	3_cuadrados \
	4_fibonacci \
	5_while \
	6_break \
	7_listas \
	8_listas-min \
	9_dicts \
	$(NULL)

all: $(PDFS)

presentation.pdf: presentation.tex slides.tex
	pdflatex "\providecommand\locale{$(LANG)}\input{$<}"
	pdflatex "\providecommand\locale{$(LANG)}\input{$<}"

handout.pdf: handout.tex slides.tex
	pdflatex "\providecommand\locale{$(LANG)}\input{$<}"
	pdflatex "\providecommand\locale{$(LANG)}\input{$<}"

check:
	$(foreach ex,$(EN_EXERCISES),pep8 exercises/en/${ex}.py exercises/en/${ex}_solution.py;)
	$(foreach ex,$(ES_EXERCISES),pep8 exercises/es/${ex}.py exercises/es/${ex}_solucion.py;)

clean:
	rm -f $(PDFS:.pdf=.aux)
	rm -f $(PDFS:.pdf=.log)
	rm -f $(PDFS:.pdf=.out)
	rm -f $(PDFS:.pdf=.nav)
	rm -f $(PDFS:.pdf=.snm)
	rm -f $(PDFS:.pdf=.toc)
	rm -f $(PDFS:.pdf=.vrb)
	rm -f $(PDFS)

.PHONY: all clean check