Fork me on GitHub

source: svn/trunk/paper/CommPhysComp/Makefile@ 722

Last change on this file since 722 was 426, checked in by Xavier Rouby, 15 years ago

first commit, paper version for Comm Phys Comp

File size: 3.9 KB
RevLine 
[426]1# Makefile - Delphes
2# X. Rouby 25.12.2008
3#
4# ----- Usage -----
5# "make" or "make all" or "make pdf" : creates the dvi/ps/pdf file
6# "make figure" : creates a tar ball with the list of figures.
7# try "make what" for more info
8
9# ----- Files & Directories -----
10# figure concerns
11EPSDIR=all_eps/
12EPSFILES=$(wildcard $(EPSDIR))
13EPSTARBZ=list_of_figures.tar.bz
14# article concerns
15SOURCEFILE=notes
16TEXFILES=$(SOURCEFILE).tex
17# all concerns
18VPATH=.:$(EPSDIR)
19LATEXOPT = --interaction batchmode
20# batchmode remove the screen output from 'latex' and 'pdflatex'; This output is recovered with 'make debug' or 'make pdfdebug'
21
22# ----- make all -----
23all: pdf
24dvi: $(SOURCEFILE).dvi
25ps: $(SOURCEFILE).ps
26#pdf: lowres
27pdf: highres
28#'make highres' uses ps2pdf -> heavy file but high resolution figures
29#'make lowres' uses pdflatex -> light file but low resolution figures
30figure: epstarbz
31manual: $(MANUAL).pdf
32
33# ----- Suffix rules -----
34$(SOURCEFILE).aux: $(TEXFILES) $(EPSFILES)
35 @echo
36 @echo Build $(SOURCEFILE).aux for proper references
37 @latex $(LATEXOPT) $(SOURCEFILE).tex
38 @echo `ls $@` : done.
39
40$(SOURCEFILE).dvi: $(SOURCEFILE).aux $(EPSFILES)
41 @echo
42 @echo Build $(SOURCEFILE).dvi from the .tex file
43 @latex $(LATEXOPT) $(SOURCEFILE).tex
44 @echo `ls $@` : done.
45
46$(SOURCEFILE).ps: $(SOURCEFILE).dvi $(EPSFILES)
47 @echo
48 @echo Build $(SOURCEFILE).ps from the .dvi file
49 @dvips -q $(SOURCEFILE).dvi -o $(SOURCEFILE).ps
50 @echo `ls $@` : done.
51
52$(SOURCEFILE).pdf: pdf
53
54#'make lowres' uses pdflatex -> light file but low resolution figures
55lowres: $(TEXFILES) $(PNGFILES)
56 @echo
57 @echo "Build $(SOURCEFILE).pdf from the .tex file, with pdflatex"
58 @pdflatex $(LATEXOPT) $(SOURCEFILE).tex
59 @pdflatex $(LATEXOPT) $(SOURCEFILE).tex
60 @echo "`ls $(SOURCEFILE).pdf` (low resolution) : done."
61
62#'make highres' uses ps2pdf -> heavy file but high resolution figures
63highres: $(SOURCEFILE).ps $(EPSFILES)
64 @echo
65 @echo "Build $(SOURCEFILE).pdf from the .ps file, with ps2pdf"
66 @ps2pdf $< $(SOURCEFILE).pdf
67 @echo "`ls $(SOURCEFILE).pdf` (high resolution) : done."
68
69debug: $(TEXFILES) $(EPSFILES)
70 @echo
71 @echo Build $(SOURCEFILE).dvi with debug info
72 @-rm -f $(SOURCEFILE).dvi
73 @latex $(SOURCEFILE).tex
74 @mv $(SOURCEFILE).dvi debug_$(SOURCEFILE).dvi
75 @echo 'debug_$(SOURCEFILE).dvi' done, '$(SOURCEFILE).dvi' removed.
76
77pdfdebug: $(TEXFILES) $(EPSFILES)
78 @echo
79 @echo Build $(SOURCEFILE).pdf with debug info
80 @-rm -f $(SOURCEFILE).pdf
81 @pdflatex $(SOURCEFILE).tex
82 @mv $(SOURCEFILE).pdf debug_$(SOURCEFILE).pdf
83 @echo 'debug_$(SOURCEFILE).pdf' done, '$(SOURCEFILE).pdf' removed.
84
85clean:
86 @echo
87 @echo "Removes the useless files (*.aux *.log *.out *.toc *.lof *.out)"
88 @-rm *.aux *.log *.out *.toc *.lof *.out -f
89 @echo done.
90
91cleanall:
92 @echo
93 @echo Removes all output files and the useless files
94 @-rm $(SOURCEFILE).pdf $(SOURCEFILE).ps *$(SOURCEFILE).dvi $(MANUAL).pdf *.aux *.log *.toc *.lof *.out *.backup *~ -f
95 @echo done.
96
97$(EPSTARBZ): $(EPSFILES)
98 @echo
99 @echo Creating $(EPSTARBZ)
100 @tar cjf $(EPSTARBZ) $(EPSDIR)
101 @echo `ls $(EPSTARBZ)` : done.
102
103epstarbz: $(EPSTARBZ)
104
105
106
107what:
108 @echo
109 @echo Try one of these :
110 @echo " 'make' or 'make all' or 'make pdf': creates the pdf files from $(SOURCEFILE).tex"
111 @echo " choose between 'make highres' (ps2pdf) and 'make lowres' (pdflatex) for the $(SOURCEFILE).pdf quality. Default is lowres (faster)."
112 @echo " 'make aux', 'make dvi', 'make ps', 'make pdf' also work"
113 @echo " 'make debug' and 'make pdfdebug' are the same as 'make dvi' and 'make pdf' with more output info"
114 @echo " 'make figure' : creates a tarball ($(EPSTARBZ)) with all the figures in eps"
115 @echo " 'make epstarbz' also work"
116 @echo " 'make clean' : removes the useless files (.aux .log)"
117 @echo " 'make cleanall' : removes all the outfiles ($(SOURCEFILE).pdf $(SOURCEFILE).ps $(SOURCEFILE).dvi)"
118 @echo " 'make what' : this help"
119
Note: See TracBrowser for help on using the repository browser.