-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
67 lines (49 loc) · 1.42 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
# Default target simply complains
PDFTEX = pdflatex
TEX = latex
FORTH = sf
usage:
@echo "Usage: make [ dvi | ps | pdf | clean ]"
# Define a few short-cut targets
dvi: forth.dvi
ps: forth.ps
pdf: forth.pdf
# Now for the actual detail
one:
$(PDFTEX) forth.tex
forth.wrd: forth.tex *.tex
$(TEX) "\scrollmode\input forth.tex"
forth.wds: forth.wrd
$(FORTH) SortIndex.fs
forth.dvi: forth.wds
$(TEX) forth.tex
$(TEX) forth.tex
# Now for the change bars
$(TEX) forth.tex
$(TEX) forth.tex
# Stop make from re-building when the ps target is used
touch forth.wds # update .wds as .wrd has been updated
touch forth.dvi # now we have to update the .dvi
forth.ps: forth.dvi
dvips -K -t A4 forth
forth.pdf: forth.wds
$(PDFTEX) forth.tex
$(PDFTEX) forth.tex
# Now for the change bars
$(PDFTEX) forth.tex
$(PDFTEX) forth.tex
zip: *.tex clean
(cd ..; zip -9 -r basis.zip basis -x \*CVS\* -x \*.pdf -x \*.zip)
mv ../basis.zip basis-`grep \\revision\} config.tex | cut -c24-27`-`date +%b-%d`.zip
clean:
# First we clean the LaTeX files
rm -f forth.log # LaTeX Log file
rm -f forth.toc # Table of Contents
rm -f *.aux # Auxiliary files
# The package extension support files
rm -f forth.cb* # Changebar
rm -f forth.out # Hyperref - PDF Bookmarks
# Document's own support files
rm -f *.sub # Auto generated support files
rm -f forth.wrd # Word list (definition order)
rm -f forth.wds # Word list (alphabetical order)