Menu

[r5318]: / trunk / py4science / workbook / Makefile  Maximize  Restore  History

Download this file

58 lines (42 with data), 1.3 kB

 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
54
55
56
57
# Makefile for the py4science book.
# Dependencies
# Warning: list the .aux *before* the bbl. It's probably possible to get the
# rules right, but I'm not sure how.
TEXFILES = $(wildcard *.tex)
SKEL_SRC = workbook_skeletons.aux workbook_skeletons.bbl \
workbook_skeletons.tex $(TEXFILES)
SOL_SRC = $(subst _skeletons,_solved,$(SKEL_SRC))
# programs
PDFTEX = pdflatex -file-line-error
FASTPDFTEX = pdflatex -file-line-error -draftmode -halt-on-error
# convenience shorthand for targets
sol: workbook_solved.pdf
skel: workbook_skeletons.pdf
all: sol skel
# actual targets
workbook_solved.pdf: $(SOL_SRC)
rm -f problems
ln -sf problems_solved problems
$(PDFTEX) workbook_solved
$(PDFTEX) workbook_solved
workbook_skeletons.pdf: $(SKEL_SRC)
rm -f problems
ln -sf problems_skel problems
$(PDFTEX) workbook_skeletons
workbook_skeletons.tex:
ln -sf main.tex workbook_skeletons.tex
workbook_solved.tex:
ln -sf main.tex workbook_solved.tex
clean:
rm -f *~ *.aux *.log *.toc *.out *.bbl *.blg
distclean: clean
rm -f workbook_solved.pdf workbook_skeletons.pdf
# Basic rules
empty :=
%.bbl : %.aux
bibtex $(subst .aux,$(empty),$<)
$(FASTPDFTEX) $(subst .aux,$(empty),$<)
%.aux : %.tex
$(FASTPDFTEX) $<
# Phony targets
.PHONY: all clean
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.