0
|
1 # target and root file name
|
|
2 TARGET = main
|
|
3
|
|
4 # class files
|
|
5 CLASS_FILE =
|
|
6
|
|
7 # figure pass
|
|
8 FIG_DIR = ./fig
|
|
9
|
|
10 # ebb or extractbb
|
|
11 EBB = extractbb
|
|
12
|
|
13 # dependent document files
|
|
14 TEX_FILES = \
|
|
15 appendix.tex \
|
|
16 bibliography.tex \
|
|
17 chapter*.tex \
|
|
18 thanks.tex \
|
|
19
|
|
20 # dependent image files
|
|
21 SVG_FILES =
|
|
22
|
|
23 # use bibtex or not (yes|no)
|
|
24 BIBTEX_ENABLED = no
|
|
25
|
|
26 # commands to compile document
|
|
27 LATEX = platex
|
|
28 BIBTEX = pbibtex
|
|
29 DVIPDF = dvipdfmx
|
|
30 DVIPS = dvips
|
|
31
|
|
32 # generated files
|
|
33 DVI_FILE = $(TARGET).dvi
|
|
34 PDF_FILE = $(TARGET).pdf
|
|
35 PS_FILE = $(TARGET).ps
|
|
36 TEX_FILES += $(TARGET).tex
|
|
37 EPS_FILES = $(SVG_FILES:%.svg=%.eps)
|
|
38 AUX_FILES = $(TEX_FILES:%.tex=%.aux)
|
|
39 GENERATED_FILE = \
|
|
40 $(EPS_FILES) \
|
|
41 $(DVI_FILE) \
|
|
42 $(PDF_FILE) \
|
|
43 $(AUX_FILES) \
|
|
44 $(TARGET).log \
|
|
45 $(TARGET).toc \
|
|
46 $(TARGET).bbl \
|
|
47 $(TARGET).blg \
|
|
48 $(TARGET).lof \
|
|
49 $(TARGET).lol \
|
|
50 texput.log
|
|
51
|
|
52 .DEFAULT_GOAL = pdf
|
|
53
|
|
54 .PHONY : pdf
|
|
55 pdf : $(PDF_FILE)
|
|
56 open $(TARGET).pdf
|
|
57 $(PDF_FILE) : $(DVI_FILE) $(TEX_FILES) $(EPS_FILES) $(CLASS_FILE)
|
|
58 $(DVIPDF) $(TARGET)
|
|
59
|
|
60 .PHONY : ps
|
|
61 ps : $(PS_FILE)
|
|
62 $(PS_FILE) : $(DVI_FILE) $(TEX_FILES) $(EPS_FILES) $(CLASS_FILE)
|
|
63 $(DVIPS) $(TARGET)
|
|
64
|
|
65 .PHONY : dvi
|
|
66 dvi : $(DVI_FILE)
|
|
67 $(DVI_FILE) : $(TEX_FILES) $(EPS_FILES) $(CLASS_FILE)
|
|
68 $(LATEX) -halt-on-error $(TARGET)
|
|
69 ifeq ($(BIBTEX_ENABLED),yes)
|
|
70 $(BIBTEX) $(TARGET)
|
|
71 endif
|
|
72 $(LATEX) -halt-on-error $(TARGET)
|
|
73 $(LATEX) -halt-on-error $(TARGET)
|
|
74
|
|
75 %.eps : %.svg
|
|
76 inkscape --export-area-drawing --without-gui --file="$<" --export-eps="$@"
|
|
77
|
|
78 .PHONY : clean
|
|
79 clean:
|
|
80 rm -f $(GENERATED_FILE)
|
|
81
|
|
82 .PHONY : help
|
|
83 help:
|
|
84 @echo "make dvi"
|
|
85 @echo " Make DVI file from tex documents."
|
|
86 @echo "make pdf"
|
|
87 @echo " Make PDF file from DVI file."
|
|
88 @echo "make ps"
|
|
89 @echo " Make PS file from DVI file."
|
|
90 @echo "make clean"
|
|
91 @echo " Remove all generated files."
|