]> matita.cs.unibo.it Git - helm.git/blob - helm/papers/matita/Makefile
Added a new section on the logical library.
[helm.git] / helm / papers / matita / Makefile
1
2 #
3 # Generic makefile for latex
4 #
5 # Author: Stefano Zacchiroli <zack@bononia.it>
6 #
7 # Created:       Sun, 29 Jun 2003 12:00:55 +0200 zack
8 # Last-Modified: Mon, 10 Oct 2005 15:37:12 +0200 zack
9 #
10
11 ########################################################################
12
13 # list of .tex _main_ files
14 TEXS = matita2.tex
15
16 # number of runs of latex (for table of contents, list of figures, ...)
17 RUNS = 1
18
19 # do you need bibtex?
20 BIBTEX = yes
21
22 # would you like to use pdflatex?
23 PDF_VIA_PDFLATEX = yes
24
25 # which formats generated by default ("all" target)?
26 # (others will be generated by "world" target)
27 # see AVAILABLE_FORMATS below 
28 BUILD_FORMATS = dvi ps
29
30 # which format to be shown on "make show"
31 SHOW_FORMAT = dvi
32
33 ########################################################################
34 all:
35
36 libraries.ps: libraries.dot
37         dot -Gclusterrank=none -Tps -o $@ $<
38 librariesCluster.ps: libraries.dot
39         dot -Tps -o $@ $<
40 matita2.dvi: libraries.ps librariesCluster.ps
41
42 ########################################################################
43
44 AVAILABLE_FORMATS = dvi ps ps.gz pdf html
45
46 ADVI = advi
47 BIBTEX = bibtex
48 BROWSER = galeon
49 DVIPDF = dvipdf
50 DVIPS = dvips
51 GV = gv
52 GZIP = gzip
53 HEVEA = hevea
54 ISPELL = ispell
55 LATEX = latex
56 PDFLATEX = pdflatex
57 PRINT = lpr
58 XDVI = xdvi
59 XPDF = xpdf
60
61 ALL_FORMATS = $(BUILD_FORMATS)
62 WORLD_FORMATS = $(AVAILABLE_FORMATS)
63
64 all: $(ALL_FORMATS)
65 world: $(WORLD_FORMATS)
66
67 DVIS = $(TEXS:.tex=.dvi)
68 PSS = $(TEXS:.tex=.ps)
69 PSGZS = $(TEXS:.tex=.ps.gz)
70 PDFS = $(TEXS:.tex=.pdf)
71 HTMLS = $(TEXS:.tex=.html)
72
73 dvi: $(DVIS)
74 ps: $(PSS)
75 ps.gz: $(PSGZS)
76 pdf: $(PDFS)
77 html: $(HTMLS)
78
79 show: show$(SHOW_FORMAT)
80 showdvi: $(DVIS)
81         $(XDVI) $<
82 showps: $(PSS)
83         $(GV) $<
84 showpdf: $(PDFS)
85         $(XPDF) $<
86 showpsgz: $(PSGZS)
87         $(GV) $<
88 showps.gz: showpsgz
89 showhtml: $(HTMLS)
90         $(BROWSER) $<
91
92 print: $(PSS)
93         $(PRINT) $^
94
95 clean:
96         rm -f \
97                 $(TEXS:.tex=.dvi) $(TEXS:.tex=.ps) $(TEXS:.tex=.ps.gz) \
98                 $(TEXS:.tex=.pdf) $(TEXS:.tex=.aux) $(TEXS:.tex=.log) \
99                 $(TEXS:.tex=.html) $(TEXS:.tex=.out) $(TEXS:.tex=.haux) \
100                 $(TEXS:.tex=.htoc) $(TEXS:.tex=.tmp)
101
102 %.dvi: %.tex
103         $(LATEX) $<
104         if [ "$(BIBTEX)" = "yes" ]; then $(BIBTEX) $*; fi
105         if [ "$(RUNS)" -gt 1 ]; then \
106                 for i in seq 1 `expr $(RUNS) - 1`; do \
107                         $(LATEX) $<; \
108                 done; \
109         fi
110 ifeq ($(PDF_VIA_PDFLATEX),yes)
111 %.pdf: %.tex
112         $(PDFLATEX) $<
113         if [ "$(BIBTEX)" = "yes" ]; then $(BIBTEX) $*; fi
114         if [ "$(RUNS)" -gt 1 ]; then \
115                 for i in seq 1 `expr $(RUNS) - 1`; do \
116                         $(PDFLATEX) $<; \
117                 done; \
118         fi
119 else
120 %.pdf: %.dvi
121         $(DVIPDF) $< $@
122 endif
123 %.ps: %.dvi
124         $(DVIPS) -ta4 $<
125 %.ps.gz: %.ps
126         $(GZIP) -c $< > $@
127 %.html: %.tex
128         $(HEVEA) -fix $<
129
130 .PHONY: all ps pdf html clean
131
132 ########################################################################
133