Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 273 lines (215 sloc) 6.902 kb
748e9e0 @nniclausse major source reorganisation to ease debian packaging
nniclausse authored
1 # $Id$
2
6610af8 @nniclausse add missing files for rebuilding pdf
nniclausse authored
3 MANPAGE_SRC = tsung.1.sgml tsplot.1.sgml tsung-recorder.1.sgml
4 MANPAGE = tsung.1 tsplot.1 tsung-recorder.1
748e9e0 @nniclausse major source reorganisation to ease debian packaging
nniclausse authored
5
6610af8 @nniclausse add missing files for rebuilding pdf
nniclausse authored
6 TOPDIR=.
aa2565c @nniclausse add user's manual src
nniclausse authored
7 IMG_TOPDIR=.
8 LOGO_DIR=$(TOPDIR)/logos
9
10 FILES=$(wildcard *.tex)
11
12 # classe et styles latex
6610af8 @nniclausse add missing files for rebuilding pdf
nniclausse authored
13 INCLUDES=shortcuts.sty TSUNG-en.cls
aa2565c @nniclausse add user's manual src
nniclausse authored
14
15 # chemin des fichiers de style
16 STYLE=$(TOPDIR)/styles
17 CSS=IDXDOC.css
18
19 # classe et styles hevea
c4ac982 @nniclausse hevea style
nniclausse authored
20 HEVEA_INC=TSUNG.hva
aa2565c @nniclausse add user's manual src
nniclausse authored
21 HEVEAOPTS=-fix -I $(STYLE) -exec xxdate.exe -pedantic
22 LANGUAGE=
23
24 # logos
100b36a @nniclausse no logo
nniclausse authored
25 LOGOS_JPG=
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
26 LOGOS_EPS = $(LOGOS_JPG:.jpg=.eps)
aa2565c @nniclausse add user's manual src
nniclausse authored
27
28 ##############
29
30 # remove image.tex generated by hevea
31 TEXFILES=$(sort $(subst image.,,$(FILES)))
32 DVIFILES=$(TEXFILES:.tex=.dvi)
33 PSFILES=$(TEXFILES:.tex=.ps)
34 PDFFILES=$(TEXFILES:.tex=.pdf)
35 HTMLFILES=$(TEXFILES:.tex=.html)
36 HTML_INDEXFILES=$(TEXFILES:.tex=_index.html)
37
38 # get figures to be generated from gnuplot file
39 PLOT_DIR = $(IMG_TOPDIR)/plot
40 PLOT_PS = $(shell grep -s output $(PLOT_DIR)/*.gplot | cut -f3 -d" " | perl -e '{ while (<>) {chomp; s/"//;s/"/ /; print} }')
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
41 PLOT=$(addprefix $(PLOT_DIR)/,$(PLOT_PS))
aa2565c @nniclausse add user's manual src
nniclausse authored
42 #PLOT = $(wildcard $(PLOT_DIR)/*.ps)
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
43 PLOT_PNG = $(PLOT:.ps=.png)
44 PLOT_PDF = $(PLOT:.ps=.pdf)
aa2565c @nniclausse add user's manual src
nniclausse authored
45
46 # figures
47 FIGURES_DIR = $(IMG_TOPDIR)/figures
48 FIGURES = $(wildcard $(FIGURES_DIR)/*.fig)
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
49 FIGURES_PNG = $(FIGURES:.fig=.png)
50 #FIGURES_JPG = $(FIGURES:.fig=.jpg)
51 FIGURES_EPS = $(FIGURES_PNG:.png=.eps)
aa2565c @nniclausse add user's manual src
nniclausse authored
52
53 # images
54 IMAGES_DIR = $(IMG_TOPDIR)/images
55 IMAGES_PNG = $(wildcard $(IMAGES_DIR)/*.png)
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
56 IMAGES_EPS = $(IMAGES_PNG:.png=.eps)
aa2565c @nniclausse add user's manual src
nniclausse authored
57
58 ALL_IMG = $(notdir $(FIGURES))
59 ALL_IMG += $(notdir $(IMAGES_PNG))
60 ALL_IMG += $(notdir $(PLOT))
61
62 # pour recompiler le doc latex autant de fois que necessaire :
63 RERUN = "(There were undefined references|Rerun to get (cross-references|the bars) right)"
64 RERUNBIB = "No file.*\.bbl|Citation.*undefined"
65
66 #'-nopostscript' afin de ne pas subir l'interprétation/rendu des fichiers PS inclus
67 XDVI=xdvi -s 0 -geometry -0+0 -margins 0cm -nopostscript
68 XPDF=xpdf -geometry 600x768+0+0 -z page
69 GV=gv
70 CONVERT=convert
71 GNUPLOT=gnuplot
72 PDFLATEX=pdflatex --interaction=batchmode
73 EPS2PDF=epstopdf
74 DVIPS=dvips
75 LATEX=latex --interaction=batchmode
76 BIBTEX=bibtex
77 FIG2DEV=fig2dev
78 VIEWER=gv
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
79 HEVEA=hevea
aa2565c @nniclausse add user's manual src
nniclausse authored
80 HACHA=hacha
81 IMAGEN=imagen
82 MAKEINDEX=makeindex
83 TIDY=tidy
84 XSLTPROC=xsltproc
85
86 XSL=$(HOME)/cvs/web/idealx3.org/xhtml.xsl
87
88 # On rajoute les fichiers templates de LaTeX dans le VPATH pour make
89 # et dans TEXINPUTS pour LaTeX
90 TEXINPUTS = :.:$(STYLE):$(LOGO_DIR):$(IMAGES_DIR):$(FIGURES_DIR):$(PLOT_DIR):
91 BSTINPUTS = :.:$(STYLE)
92 VPATH = $(TEXINPUTS)
93
94 # pour exporter TEXINPUTS
95 .EXPORT_ALL_VARIABLES:
96
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
97 .PHONY: clean distclean pdf dvi ps all html htmlsingle
aa2565c @nniclausse add user's manual src
nniclausse authored
98
99 # Stop GNU make from overzealous deletion of intermediate files
100 .PRECIOUS: %.dvi $(FIGURES_PNG) $(FIGURES_JPG) $(IMAGES_EPS) $(LOGOS_EPS) $(PLOT) $(PLOT_PNG) $(PLOT_PDF)
101
748e9e0 @nniclausse major source reorganisation to ease debian packaging
nniclausse authored
102 all: man
103
104 man: $(MANPAGE)
aa2565c @nniclausse add user's manual src
nniclausse authored
105
898cba9 @nniclausse dependencies fix for boot files and doc
nniclausse authored
106 %.1: %.1.sgml
107 docbook2man $< >/dev/null 2>&1
aa2565c @nniclausse add user's manual src
nniclausse authored
108
109
110 psimages: $(FIGURES_EPS) $(IMAGES_EPS) $(LOGOS_EPS)
111
112 pngimages: $(FIGURES_PNG)
113
114 show:
100b36a @nniclausse no logo
nniclausse authored
115 @echo INC = $(INCLUDES)
116 @echo FIG = $(FIGURES_PNG)
117 @echo IMG= $(IMAGES_PNG)
118 @echo HEVEA= $(HEVEA_INC)
119 @echo PLOT= $(PLOT_PNG)
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
120 @echo TEX = $(TEXFILES)
121 @echo HTML = $(HTMLFILES)
122 @echo LOGOS = $(LOGOS_EPS)
aa2565c @nniclausse add user's manual src
nniclausse authored
123 @echo ALL_IMG = $(ALL_IMG)
100b36a @nniclausse no logo
nniclausse authored
124 @echo TEXINPUTS = $(TEXINPUTS)
aa2565c @nniclausse add user's manual src
nniclausse authored
125
126 dist: pdf html
127 tar zvcfh archive.tgz *.html *.pdf $(ALL_IMG) $(CSS)
128
129
130 dvi: $(DVIFILES)
131 ps: $(PSFILES)
132 pdf: $(PDFFILES)
133 html: $(HTMLFILES)
134 htmlsplit: $(HTML_INDEXFILES)
135 print: $(PSFILES)
136 @echo "printing $<"
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
137 a2ps $<
aa2565c @nniclausse add user's manual src
nniclausse authored
138
139 #glossaire:
140 # $(MAKEINDEX) -s tlglo.ist -o these.gls these.glo
141 # makeindex these
142 #makeindex -s tlglo.ist -o these.gls these.glo
143
144 %_index.html: %.html
145 @echo splitting $@ ...
146 @$(HACHA) $(LANGUAGE) -o $@ $<
147
100b36a @nniclausse no logo
nniclausse authored
148 #%.html: %.tex $(INCLUDES) $(FIGURES_PNG) $(IMAGES_PNG) $(HEVEA_INC) $(LOGOS_EPS) $(PLOT_PNG)
aa2565c @nniclausse add user's manual src
nniclausse authored
149
6b34bf4 @nniclausse merge from 1.3.1 branch
nniclausse authored
150 user_manual.html: user_manual.tex ../CHANGES $(INCLUDES) $(FIGURES_PNG) $(IMAGES_PNG) $(HEVEA_INC) $(LOGOS_EPS) $(PLOT_PNG)
aa2565c @nniclausse add user's manual src
nniclausse authored
151 @echo Generating $@...
152 @$(HEVEA) $(HEVEAOPTS) $(LANGUAGE) $(HEVEA_INC) $<
153 ifeq ($(strip $(IMAGES_PNG)),)
154 @echo no images
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
155 else
aa2565c @nniclausse add user's manual src
nniclausse authored
156 @echo Generating images for html...
157 @ln -sf $(IMAGES_DIR)/*.png .
158 endif
159 ifeq ($(strip $(FIGURES_PNG)),)
160 @echo no figures
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
161 else
aa2565c @nniclausse add user's manual src
nniclausse authored
162 @echo Generating figures for html...
163 @ln -sf $(FIGURES_DIR)/*.png .
164 endif
165 ifeq ($(strip $(PLOT_PNG)),)
166 @echo no plot
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
167 else
aa2565c @nniclausse add user's manual src
nniclausse authored
168 @echo Generating plot for html...
169 @ln -sf $(PLOT_DIR)/*.png .
170 endif
171 @echo done
172
173 %.xhtml: %.html
174 @echo "Generating XHTML"
175 @$(TIDY) -latin1 -f $*.tidy_log -c -asxml $*.html > $*.xhtml ; true
176
177 %.xml: %.xhtml $(XSL)
178 @echo Generating $@...
179 @$(XSLTPROC) -o $*.xml $(XSL) $*.xhtml
180 @perl -i -pe 's@idxwebml-xhtml.dtd">@../../idxwebml.dtd" [<!ENTITY leftbar SYSTEM "menu.xml">]>@g' $*.xml
181 @echo "done"
182
183 ## remove builtin GNU-make implicit rule for dvi
184 %.dvi : %.tex
185
186 gv: ps
187 @$(GV) $(FILE) &
188
189 xpdf: pdf
190 @$(XPDF) $(FILE).pdf &
191
192 %.dvi: %.tex Makefile $(INCLUDES) $(LOGOS_EPS) $(FIGURES_EPS) $(IMAGES_EPS) $(PLOT)
193 @echo Generating $@...
194 @echo
195 @$(LATEX) $<
196 @egrep -c $(RERUNBIB) $*.log && ($(BIBTEX) $*;$(LATEX) $<) ; true
197 @egrep $(RERUN) $*.log && $(LATEX) $< ; true
198 @egrep $(RERUN) $*.log && $(LATEX) $< ; true
199 # Display relevant warnings
200 @egrep -i "(Reference|Citation).*undefined" $*.log ; true
201
202 %.ps: %.dvi
203 @echo Generating $@...
204 @dvips -q -t a4 -o $@ $<
205 @echo done.
206
6b34bf4 @nniclausse merge from 1.3.1 branch
nniclausse authored
207 %.pdf: %.tex ../CHANGES $(INCLUDES) $(LOGOS_JPG) $(FIGURES_PNG) $(IMAGES_PNG) $(PLOT_PDF)
aa2565c @nniclausse add user's manual src
nniclausse authored
208 @echo Generating $@...
209 @echo
210 @$(PDFLATEX) $<
211 @egrep -c $(RERUNBIB) $*.log && ($(BIBTEX) $*;$(LATEX) $<) ; true
212 @egrep $(RERUN) $*.log && $(PDFLATEX) $< ; true
213 @egrep $(RERUN) $*.log && $(PDFLATEX) $< ; true
214 # Display relevant warnings
215 @egrep -i "(Reference|Citation).*undefined" $*.log ; true
216
217 %.eps: %.jpg
218 @echo convert $< $@
219 @$(CONVERT) $< $@
220
221 %.eps: %.png
222 @echo convert $< $@
223 @$(CONVERT) $< $@
224
748e9e0 @nniclausse major source reorganisation to ease debian packaging
nniclausse authored
225 clean:
aa2565c @nniclausse add user's manual src
nniclausse authored
226 @echo -n Cleaning intermediate files...
82cf947 @nniclausse fix build
nniclausse authored
227 @rm -f *.{aux,log,toc,bak,haux,lof,out,htoc,ps,links,refs,1} $(LOGOS_EPS)
aa2565c @nniclausse add user's manual src
nniclausse authored
228 @echo " done."
229
230 $(PLOT_DIR)/%.ps: $(PLOT_DIR)/*.gplot
231 @echo \* Producing ps files $< with data with gnuplot
232 @cd $(PLOT_DIR); $(GNUPLOT) *.gplot ; cd -
233
234 $(PLOT_DIR)/%.png: $(PLOT_DIR)/%.ps
235 @echo Generating $@
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
236 @$(CONVERT) $< $@
aa2565c @nniclausse add user's manual src
nniclausse authored
237
238 $(PLOT_DIR)/%.pdf: $(PLOT_DIR)/%.ps
239 @echo Generating $@
240 @$(EPS2PDF) $<
241
242 $(FIGURES_DIR)/%.png: $(FIGURES_DIR)/%.fig
243 @echo Generating $@
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
244 @$(FIG2DEV) -L png $< $@
aa2565c @nniclausse add user's manual src
nniclausse authored
245
246 $(FIGURES_DIR)/%.jpg: $(FIGURES_DIR)/%.fig
247 @echo Generating $@
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
248 @$(FIG2DEV) -L jpeg $< $@
aa2565c @nniclausse add user's manual src
nniclausse authored
249
250 $(FIGURES_DIR)/%.eps: $(FIGURES_DIR)/%.fig
251 @echo Generating $@
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
252 @$(FIG2DEV) -L eps $< $@
aa2565c @nniclausse add user's manual src
nniclausse authored
253
254 $(IMAGES_DIR)/%.jpg: $(IMAGES_DIR)/%.png
255 @echo Generating $@
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
256 @$(CONVERT) $< $@
aa2565c @nniclausse add user's manual src
nniclausse authored
257
258 $(IMAGES_DIR)/%.eps: $(IMAGES_DIR)/%.png
259 @echo Generating $@
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
260 @$(CONVERT) $< $@
aa2565c @nniclausse add user's manual src
nniclausse authored
261
262 $(LOGO_DIR)/%.eps: $(IMAGES_DIR)/%.jpg
263 @echo Generating $@
fb11e0f @nniclausse - include tsung-plotter tool from Dimitri Fontaine (TSUN-89)
nniclausse authored
264 @$(CONVERT) $< $@
aa2565c @nniclausse add user's manual src
nniclausse authored
265
266 mrproper: distclean
267
268 distclean: clean
269 @echo -n Cleaning result files...
270 @rm -f $(DVIFILES) $(PSFILES) $(PDFFILES) $(LOGOS_EPS) $(FIGURES_EPS) $(FIGURES_PNG) *.html *motif.gif $(IMAGES_DIR)/*.eps *.png *.image.tex $(PLOT_PNG) $(PLOT_PDF) $(PLOT) *.bbl *.blg''
271 @echo " done."
272
Something went wrong with that request. Please try again.