forked from jschauma/book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·132 lines (110 loc) · 3.3 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Principles of System Administration
# https://www.netmeister.org/book/
# https://www.netmeister.org/blog/half-a-book.html
#
# Jan Schaumann - @jschauma
TARGET = principles-of-system-administration
TEXDIR = ./common:
#LATEX = env TEXINPUTS=${TEXDIR} latex
LATEX = env TEXINPUTS=${TEXDIR} pdflatex
BIBTEX = bibtex
DVIPS = dvips -o
PS2PDF = ps2pdf
PDFTOTEXT= pdftotext
FIGURES= common/pics/totally-socks-donkey.pdf \
common/pics/pointer.pdf \
common/pics/tangent-deck.pdf \
01/pics/we-are-happy-to-serve-you-coffee-mug.pdf \
01/pics/Ibm704.pdf \
02/pics/unix-plate.pdf \
02/pics/unix_history.pdf \
02/pics/pipeline.pdf \
02/pics/VAX_11-780_intero.pdf \
02/pics/Mac-mini-1st-gen.pdf \
02/pics/Dellpoweredge2950.pdf \
03/pics/pen.pdf \
04/pics/box.pdf \
04/pics/das.pdf \
04/pics/nas.pdf \
04/pics/huawei.pdf \
04/pics/maxtor.pdf \
04/pics/san-nas-das.pdf \
04/pics/cloud-storage.pdf \
04/pics/open-hard-drive.pdf \
04/pics/ssd-minipcie.pdf \
04/pics/xraid.pdf \
04/pics/netapp.pdf \
04/pics/chs.pdf \
04/pics/disk-structure-zone-bit-recording.pdf \
04/pics/lvm.pdf \
04/pics/raid-0.pdf \
04/pics/raid-1.pdf \
04/pics/raid-5.pdf \
04/pics/filesystem-tree-mountpoints.pdf \
04/pics/ufs-details.pdf \
04/pics/ls-l.pdf \
05/pics/many-boxes.pdf \
05/pics/POST.pdf \
05/pics/BIOS.pdf \
05/pics/grub.pdf \
05/pics/opensolaris-install.pdf \
05/pics/types-of-software.pdf \
05/pics/wireshark-dependencies.pdf \
05/pics/bower.pdf \
05/pics/pip.pdf \
06/pics/user-mapping.pdf \
06/pics/user-groups.pdf \
06/pics/groups-machines.pdf \
07/pics/host-states.pdf \
07/pics/change-sets.pdf \
07/pics/config-management-overlap.pdf \
07/pics/host-sets.pdf \
08/pics/tools-evolution.pdf \
08/pics/wall-e.pdf \
09/pics/army-knife.pdf
.SUFFIXES: .tex .dvi .ps .pdf .txt .fig .eps .png .jpg .gif .inx .srt .dot
all: pdf
figures: $(FIGURES)
$(TARGET).dvi: */*.tex ${FIGURE}
rm -f $(TARGET).idx $(TARGET).adx $(TARGET).and $(TARGET).gl*
$(LATEX) $(TARGET).tex
makeindex $(TARGET).idx
makeindex $(TARGET).adx -o $(TARGET).and
makeglossaries $(TARGET)
$(LATEX) $(TARGET).tex
.dot.eps:
# for some reason whitespace is compressed when translating
# directly to EPS, so do the extra step of converting to png
# first:
dot -Tpng <$< > /tmp/t && \
convert /tmp/t $@
.fig.eps:
fig2dev -L eps $< > $@
.png.eps:
convert $< $@
.png.pdf:
convert $< $@
.jpg.pdf:
convert $< $@
.gif.pdf:
convert $< $@
pdf: $(TARGET).pdf
$(TARGET).pdf: $(FIGURES) */*.tex
rm -f $(TARGET).idx $(TARGET).adx $(TARGET).and $(TARGET).gl*
$(LATEX) $(TARGET).tex
makeindex $(TARGET).idx
makeindex $(TARGET).adx -o $(TARGET).and
makeglossaries $(TARGET)
$(LATEX) $(TARGET).tex
txt: $(TARGET).dvi $(TARGET).ps $(TARGET).pdf $(TARGET).txt
html:
latex2html $(LATEX2HTMLOPTS) $(TARGET).tex
.ps.pdf:
$(PS2PDF) $< $@ 2>/dev/null
.pdf.txt:
$(PDFTOTEXT) $< $@
clean:
rm -f *.lol *.alg *.ac* *.gl* *.ist *.out *.aut *.adx *.and *.att *.srt *.idx *.ilg *.ind *.lot **.bbl *.blg *.log *.aux *.dvi *.ps *.pdf *.toc *.bak *.lof ${FIGURES}
rm -fr */*.aux */*.log
rm -fr $(TARGET)/
rm -f */pics/*eps-converted-to.pdf