-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (47 loc) · 1.49 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
LATEX = latex
DVIPS = dvips
PDFFLAGS = -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress \
-dCompressPages=true -dUseFlateCompression=true \
-dEmbedAllFonts=true -dSubsetFonts=true -dMaxSubsetPct=100
%.dvi: %.tex
$(LATEX) $<
%.ps: %.dvi
$(DVIPS) -o $@ $<
%.pdf: %.ps
ps2pdf $(PDFFLAGS) $<
all: book.tex
latex book
makeindex book
latex book
dvips -t letter -Ppdf -o thinkpython.ps book
# dvips -T 6.75in,9.25in -Ppdf -o thinkpython.ps book
# dvips -t b5 -Ppdf -o thinkpython.ps book
# dvips -T 7in,10in -Ppdf -o thinkpython.ps book
gv thinkpython.ps
html: book.tex header.html footer.html
rm -rf html
mkdir html
hevea -O -e latexonly htmlonly book
# the following line is a kludge to prevent imagen from seeing
# the definitions in latexonly
grep -v latexonly book.image.tex > a; mv a book.image.tex
imagen -png book
hacha book.html
cp up.png next.png back.png html
mv index.html book.css book*.html book*.png *motif.gif html
DEST = /home/downey/public_html/greent/thinkpython
epub:
cd html; ebook-convert index.html thinkpython.epub
distrib:
ps2pdf $(PDFFLAGS) thinkpython.ps
rm -rf dist
mkdir dist dist/tex dist/tex/figs
rsync -a thinkpython.pdf thinkpython.ps html dist
rsync -a Makefile book.tex latexonly htmlonly dist/tex
rsync -a figs/*.fig figs/*.eps dist/tex/figs
cd dist; zip -r thinkpython.tex.zip tex
cd dist; zip -r thinkpython.html.zip html
rsync -a dist/* $(DEST)
chmod -R o+r $(DEST)/*
clean:
rm -f *~ *.aux *.log *.dvi *.idx *.ilg *.ind *.toc