Primeiro commit. Ainda falta muita informação.
[guialinuxUA.git] / Makefile
blob5e015b8384cc86d71545cb375b0b51eec62d0a52
1 # Generic make file for LaTeX: requires GNU make
3 # This makefile provides four targets: dvi, ps, pdf and clean.
4 # The default is "pdf".
5 # To make a dvi file, type "make dvi"
6 # To make a ps file, type "make ps".
7 # To make a pdf file, type "make pdf" or simply "make".
8 # To remove all files generated by make, type "make clean".
10 # Rouben Rostmaian
11 # September 2002
12 # JMR Jan 2005
13 # Cristóvão Cruz October, 2009
15 TEXFILE = guiao.tex
17 HISTORIA = historia.tex $(wildcard historia/*.tex)
18 INSTALACAO = instalacao.tex $(wildcard instalacao/*.tex)
19 PRIMEIROSPASSOS = primeirospassos.tex $(wildcard primeirospassos/*.tex)
20 SOURCES = $(HISTORIA) $(INSTALACAO) $(PRIMEIROSPASSOS)
22 .PHONY: dvi ps pdf clean cleanall
24 pdf: $(TEXFILE:.tex=.pdf)
25 ps: $(TEXFILE:.tex=.ps)
26 dvi: $(TEXFILE:.tex=.dvi)
28 %.dvi: %.tex $(SOURCES)
29 ( \
30 \latex $<; \
31 while \grep -qE "Rerun" $(<:.tex=.log); \
32 do \
33 \latex $<; \
34 done \
37 %.ps: %.dvi
38 \dvips -o -q -t a4 $<
40 %.pdf: %.ps
41 \ps2pdf -dPDFSETTINGS=/prepress $<
43 clean:
44 @\rm -vf \
45 $(TEXFILE:.tex=.aux) \
46 $(TEXFILE:.tex=.log) \
47 $(TEXFILE:.tex=.out) \
48 $(TEXFILE:.tex=.idx) \
49 $(TEXFILE:.tex=.toc) \
50 $(wildcard *.aux)
52 cleanall: clean
53 @\rm -vf \
54 $(TEXFILE:.tex=.dvi) \
55 $(TEXFILE:.tex=.pdf) \
56 $(TEXFILE:.tex=.ps) \