0
|
1 MAKE=make -f Makefile
|
|
2 LATEX=platex
|
|
3 BIBTEX=jbibtex
|
|
4 DVIPS=dvips
|
|
5 DVIPDFM=dvipdfm
|
|
6
|
|
7
|
|
8 MAIN_TARGET=handout
|
|
9 PS_SUFFIX=.ps
|
|
10 PDF_SUFFIX=.pdf
|
|
11
|
|
12 .SUFFIXES: .tex .dvi
|
|
13
|
|
14 dvi:
|
|
15 @echo "========== MAKE DVI file ($(MAIN_TARGET).dvi) =========="
|
|
16 $(LATEX) $(MAIN_TARGET)
|
|
17
|
|
18 bib: dvi
|
|
19 @echo "========== MAKE Bib file ($(MAIN_TARGET).dvi) =========="
|
|
20 $(BIBTEX) $(MAIN_TARGET)
|
|
21
|
|
22 final: dvi
|
|
23 @echo "========== PUBLISHING =========="
|
|
24 @echo "\t first..."
|
|
25 $(LATEX) $(MAIN_TARGET) > /dev/null
|
|
26 @echo "\t second..."
|
|
27 $(LATEX) $(MAIN_TARGET) > /dev/null
|
|
28
|
|
29 ps: final
|
|
30 @echo "========== GENERATE PostScript (PS) =========="
|
|
31 $(DVIPS) $(MAIN_TARGET)
|
|
32
|
|
33 pdf: final
|
|
34 @echo "========== GENERATE PDF file =========="
|
|
35 # out2uni $(MAIN_TARGET)
|
|
36 $(LATEX) $(MAIN_TARGET) > /dev/null
|
|
37 $(DVIPDFM) $(MAIN_TARGET)
|
|
38
|
|
39 clean:
|
|
40 @echo "remove $(MAIN_TARGET)*{aux,log,toc,lof,lot,blg,bbl,ilg,dvi,ps,pdf,out}"
|
|
41 @if [ -f $(MAIN_TARGET).aux ];\
|
|
42 then $(RM) $(MAIN_TARGET).aux;\
|
|
43 fi
|
|
44 @if [ -f $(MAIN_TARGET).log ];\
|
|
45 then $(RM) $(MAIN_TARGET).log;\
|
|
46 fi
|
|
47 @if [ -f $(MAIN_TARGET).toc ];\
|
|
48 then $(RM) $(MAIN_TARGET).toc;\
|
|
49 fi
|
|
50 @if [ -f $(MAIN_TARGET).lof ];\
|
|
51 then $(RM) $(MAIN_TARGET).lof;\
|
|
52 fi
|
|
53 @if [ -f $(MAIN_TARGET).lot ];\
|
|
54 then $(RM) $(MAIN_TARGET).lot;\
|
|
55 fi
|
|
56 @if [ -f $(MAIN_TARGET).blg ];\
|
|
57 then $(RM) $(MAIN_TARGET).blg;\
|
|
58 fi
|
|
59 @if [ -f $(MAIN_TARGET).bbl ];\
|
|
60 then $(RM) $(MAIN_TARGET).bbl;\
|
|
61 fi
|
|
62 @if [ -f $(MAIN_TARGET).ilg ];\
|
|
63 then $(RM) $(MAIN_TARGET).ilg;\
|
|
64 fi
|
|
65 @if [ -f $(MAIN_TARGET).dvi ];\
|
|
66 then $(RM) $(MAIN_TARGET).dvi;\
|
|
67 fi
|
|
68 @if [ -f $(MAIN_TARGET).ps ];\
|
|
69 then $(RM) $(MAIN_TARGET).ps;\
|
|
70 fi
|
|
71 @if [ -f $(MAIN_TARGET).pdf ];\
|
|
72 then $(RM) $(MAIN_TARGET).pdf;\
|
|
73 fi
|
|
74 @if [ -f $(MAIN_TARGET).out ];\
|
|
75 then $(RM) $(MAIN_TARGET).out;\
|
|
76 fi
|
|
77
|
|
78 veryclean: clean
|
|
79 find ./ -name \*~ -exec rm -f {} \;
|