[2] | 1 | #################################################################### |
---|
| 2 | ### ### |
---|
| 3 | ### Makefile pour LaTeX ### |
---|
| 4 | ### ### |
---|
| 5 | #################################################################### |
---|
| 6 | # |
---|
| 7 | # Copyright 2000-2011 Gabriel Moreau / Vincent Morra |
---|
| 8 | |
---|
| 9 | # Il y a encore pas mal de bug dans ce makefile |
---|
| 10 | # génération du these.ps -> des merdouilles au niveau |
---|
| 11 | # des figures. Solution: aller sous tmp/ et dvips à la main |
---|
| 12 | |
---|
[4] | 13 | # General configuration |
---|
| 14 | # Put your change only in config.mk file |
---|
| 15 | ################################################################ |
---|
| 16 | |
---|
[2] | 17 | QUIX := A.linux |
---|
| 18 | |
---|
[4] | 19 | DOCUMENT := document |
---|
[2] | 20 | |
---|
| 21 | ARBO_TEX := ./ |
---|
| 22 | ARBO_FIG := $(ARBO_TEX) |
---|
[5] | 23 | ARBO_BIB := $(ARBO_TEX) |
---|
[2] | 24 | |
---|
| 25 | ################################################################ |
---|
| 26 | |
---|
| 27 | DIR_PROJET := $(shell pwd | perl -p -e 's!/src/?.*$!!!' ) |
---|
| 28 | DIR_TMP := $(DIR_PROJET)/tmp |
---|
| 29 | DIR_DOC := $(DIR_PROJET)/doc |
---|
| 30 | DIR_PS := $(DIR_DOC)/ps |
---|
| 31 | DIR_PDF := $(DIR_DOC)/pdf |
---|
| 32 | DIR_HTML := $(DIR_DOC)/html |
---|
| 33 | |
---|
| 34 | ################################################################ |
---|
| 35 | |
---|
[4] | 36 | LATEX := latex |
---|
| 37 | BIBTEX := bibtex |
---|
| 38 | L2H := latex2html |
---|
| 39 | PDFTEX := pdflatex |
---|
| 40 | DVIPS := dvips |
---|
| 41 | RM := rm -f |
---|
[2] | 42 | BIN_PROTECT := chmod u-w . |
---|
| 43 | BIN_UNPROTECT := chmod u+w . |
---|
| 44 | |
---|
[5] | 45 | DVI_VIEWER := xdvi |
---|
| 46 | PDF_VIEWER := xpdf |
---|
| 47 | PS_VIEWER := gv |
---|
| 48 | |
---|
| 49 | |
---|
[4] | 50 | # User Config |
---|
| 51 | ################################################################ |
---|
| 52 | |
---|
| 53 | sinclude config.mk |
---|
| 54 | |
---|
[2] | 55 | # NE PAS TOUCHER A PARTIR D'ICI |
---|
| 56 | ################################################################ |
---|
| 57 | |
---|
| 58 | SRC_FIG := $(notdir $(foreach dir,$(ARBO_FIG),$(wildcard $(dir)/*.fig))) |
---|
[5] | 59 | SRC_EPS := $(notdir $(foreach dir,$(ARBO_FIG),$(wildcard $(dir)/*.eps))) |
---|
| 60 | SRC_PDF := $(notdir $(foreach dir,$(ARBO_FIG),$(wildcard $(dir)/*.pdf))) |
---|
| 61 | SRC_JPG := $(notdir $(foreach dir,$(ARBO_FIG),$(wildcard $(dir)/*.jpg))) |
---|
| 62 | SRC_PNG := $(notdir $(foreach dir,$(ARBO_FIG),$(wildcard $(dir)/*.png))) |
---|
| 63 | SRC_GIF := $(notdir $(foreach dir,$(ARBO_FIG),$(wildcard $(dir)/*.gif))) |
---|
[2] | 64 | SRC_TEX := $(notdir $(foreach dir,$(ARBO_TEX),$(wildcard $(dir)/*.tex))) |
---|
[5] | 65 | SRC_BIB := $(notdir $(foreach dir,$(ARBO_BIB),$(wildcard $(dir)/*.bib))) |
---|
[2] | 66 | |
---|
| 67 | #OBJ_PSTEX := $(patsubst %.fig,$(DIR_TMP)/%.pstex, $(SRC_FIG)) |
---|
| 68 | #OBJ_PDFTEX := $(patsubst %.fig,$(DIR_TMP)/%.pdftex, $(SRC_FIG)) |
---|
| 69 | OBJ_EPS := $(patsubst %.fig,$(DIR_TMP)/%.eps, $(SRC_FIG)) |
---|
| 70 | OBJ_PSTEX_T := $(patsubst %.fig,$(DIR_TMP)/%.pstex_t, $(SRC_FIG)) |
---|
| 71 | OBJ_PDF := $(patsubst %.fig,$(DIR_TMP)/%.pdf, $(SRC_FIG)) |
---|
| 72 | OBJ_PDFTEX_T := $(patsubst %.fig,$(DIR_TMP)/%.pdftex_t, $(SRC_FIG)) |
---|
| 73 | |
---|
[5] | 74 | OBJ_PDF4EPS := $(patsubst %.eps,$(DIR_TMP)/%.pdf, $(SRC_EPS)) |
---|
| 75 | |
---|
| 76 | |
---|
[2] | 77 | OBJ_BASE := $(DIR_TMP)/$(DOCUMENT) |
---|
| 78 | |
---|
[6] | 79 | TEXINPUTS := $(subst //,/,$(subst / /,:/,$(foreach dir,$(ARBO_TEX),$(strip $(DIR_PROJET)/src/$(dir)/)))):$(DIR_TMP): |
---|
| 80 | BIBINPUTS := $(subst //,/,$(subst / /,:/,$(foreach dir,$(ARBO_BIB),$(strip $(DIR_PROJET)/src/$(dir)/)))) |
---|
[2] | 81 | |
---|
[6] | 82 | PDFTEXPRE := export TEXMFOUTPUT="$(DIR_TMP)"; |
---|
| 83 | #PDFTEXPRE += export TEXINPUTS="$(DIR_PROJET)/src//:$(DIR_PROJET)/src/Figures:$(DIR_TMP):"; |
---|
| 84 | PDFTEXPRE += export TEXINPUTS="$(TEXINPUTS)"; |
---|
| 85 | PDFTEXPRE += export LANG="C"; |
---|
| 86 | |
---|
[5] | 87 | BIBTEXPRE := cd $(DIR_TMP); |
---|
| 88 | BIBTEXPRE += BIBINPUTS="$(BIBINPUTS)" |
---|
[6] | 89 | BIBTEXPRE += BSTINPUTS="$(BIBINPUTS)" |
---|
[5] | 90 | |
---|
[2] | 91 | RERUNTEX := "(There were undefined references|Rerun to get (cross-references|the bars) right)" |
---|
| 92 | RERUNBIB := "No file.*\.bbl|Citation.*undefined" |
---|
| 93 | |
---|
| 94 | COPYTOC := if test -r $(OBJ_BASE).toc; then cp $(OBJ_BASE).toc $(OBJ_BASE).toc.bak; fi |
---|
| 95 | |
---|
| 96 | vpath %.fig $(ARBO_FIG) |
---|
| 97 | vpath %.pstex $(DIR_TMP) |
---|
| 98 | vpath %.pstex_t $(DIR_TMP) |
---|
| 99 | vpath %.pdftex $(DIR_TMP) |
---|
| 100 | vpath %.pdftex_t $(DIR_TMP) |
---|
[5] | 101 | vpath %.pdf $(ARBO_FIG) $(DIR_TMP) |
---|
| 102 | vpath %.eps $(ARBO_FIG) $(DIR_TMP) |
---|
| 103 | vpath %.jpg $(ARBO_FIG) |
---|
| 104 | vpath %.png $(ARBO_FIG) |
---|
| 105 | vpath %.gif $(ARBO_FIG) |
---|
[2] | 106 | |
---|
[5] | 107 | vpath %.bib $(ARBO_BIB) |
---|
| 108 | |
---|
[6] | 109 | .PHONY: all folder |
---|
[2] | 110 | .PHONY: doc docps docpdf |
---|
| 111 | .PHONY: html |
---|
| 112 | .PHONY: xpdf xdvi gv |
---|
| 113 | .PHONY: echo clean miniclean help |
---|
| 114 | .PHONY: figure bibtex |
---|
| 115 | .PHONY: pdflatex pdf |
---|
| 116 | .PHONY: latex dvi |
---|
| 117 | .PHONY: protect unprotect |
---|
| 118 | .PHONY: warning review |
---|
| 119 | .SUFFIXES: |
---|
| 120 | |
---|
| 121 | #--------------------------------------------------------------# |
---|
| 122 | |
---|
[6] | 123 | all: folder doc |
---|
[2] | 124 | |
---|
[6] | 125 | folder: $(DIR_HTML) $(DIR_PS) $(DIR_PDF) $(DIR_TMP) |
---|
[2] | 126 | @echo '############################################################' |
---|
| 127 | @echo '### Fin de la gestion des dossiers' |
---|
| 128 | @echo '############################################################' |
---|
| 129 | |
---|
| 130 | #--------------------------------------------------------------# |
---|
| 131 | |
---|
| 132 | xpdf: $(DIR_TMP)/$(DOCUMENT).pdf |
---|
[5] | 133 | $(PDF_VIEWER) $(DIR_TMP)/$(DOCUMENT).pdf & |
---|
[2] | 134 | @echo '############################################################' |
---|
| 135 | @echo '#### Visualisation de $(DOCUMENT)' |
---|
| 136 | @echo '############################################################' |
---|
| 137 | |
---|
| 138 | xdvi: $(DIR_TMP)/$(DOCUMENT).dvi |
---|
| 139 | export XEDITOR="nedit-nc -line %l %f"; \ |
---|
[5] | 140 | $(DVI_VIEWER) -bg grey95 $(DIR_TMP)/$(DOCUMENT) & |
---|
[2] | 141 | @echo '############################################################' |
---|
| 142 | @echo '#### Visualisation de $(DOCUMENT)' |
---|
| 143 | @echo '############################################################' |
---|
| 144 | # xdvi -hl white $(DIR_TMP)/$(DOCUMENT) & |
---|
| 145 | |
---|
| 146 | gv:$(DIR_PS)/$(DOCUMENT).ps |
---|
[5] | 147 | $(PS_VIEWER) $(DIR_PS)/$(DOCUMENT).ps & |
---|
[2] | 148 | @echo '############################################################' |
---|
| 149 | @echo '#### Visualisation de $(DOCUMENT)' |
---|
| 150 | @echo '############################################################' |
---|
| 151 | |
---|
| 152 | #--------------------------------------------------------------# |
---|
| 153 | |
---|
| 154 | doc: docpdf docps |
---|
| 155 | @echo '############################################################' |
---|
| 156 | @echo '### Fin de la compilation ' |
---|
| 157 | @echo '############################################################' |
---|
| 158 | |
---|
| 159 | docpdf: $(DIR_PDF)/$(DOCUMENT).pdf |
---|
| 160 | @echo '############################################################' |
---|
| 161 | @echo '### Fin de la doc pdf' |
---|
| 162 | @echo '############################################################' |
---|
| 163 | |
---|
| 164 | docps: $(DIR_PS)/$(DOCUMENT).ps |
---|
| 165 | @echo '############################################################' |
---|
| 166 | @echo '### Fin de la doc postscript' |
---|
| 167 | @echo '############################################################' |
---|
| 168 | |
---|
| 169 | html: $(DIR_HTML) |
---|
[5] | 170 | $(L2H) -split 3 -local_icons -no_math -white \ |
---|
[2] | 171 | -tmp /tmp -dir $(DIR_HTML) -prefix $(DOCUMENT) -antialias $(DOCUMENT).tex |
---|
| 172 | |
---|
| 173 | #--------------------------------------------------------------# |
---|
| 174 | |
---|
| 175 | warning: |
---|
| 176 | @echo '############################################################' |
---|
| 177 | @echo '### Liste des warnings dans le documents' |
---|
| 178 | @echo '############################################################' |
---|
| 179 | # @touch -r $(DOCUMENT).tex $(DIR_TMP)/warning.log |
---|
[7] | 180 | # @touch -r $(DIR_TMP)/warning.log |
---|
| 181 | # @touch $(DOCUMENT).tex |
---|
| 182 | @make pdflatex | grep Warning | grep -v Marginpar |
---|
[2] | 183 | # @touch -r $(DIR_TMP)/warning.log $(DOCUMENT).tex |
---|
[7] | 184 | # @touch -r $(DIR_TMP)/warning.log |
---|
[2] | 185 | |
---|
| 186 | review: |
---|
| 187 | @echo '############################################################' |
---|
| 188 | @echo "### Liste des `grep -HnE '\\rev(add|del|mark|par|forget)' -r . | grep -E '^*/.*\.tex\:' | grep -v macro_review.tex | wc -l` reviews dans le documents" |
---|
| 189 | @echo '############################################################' |
---|
| 190 | @grep -HnE '\\rev(add|del|mark|par|forget)' -r . | grep -E '^*/.*\.tex\:' | grep -v macro_review.tex |
---|
| 191 | |
---|
| 192 | #--------------------------------------------------------------# |
---|
| 193 | |
---|
| 194 | echo: |
---|
| 195 | @echo '############################################################' |
---|
| 196 | @echo '### Liste des variables ' |
---|
| 197 | @echo '############################################################' |
---|
| 198 | @echo SRC_FIG $(SRC_FIG) |
---|
| 199 | @echo SRC_TEX $(SRC_TEX) |
---|
| 200 | @echo OBJ_PSTEX $(OBJ_PSTEX) |
---|
| 201 | @echo OBJ_PSTEX_T $(OBJ_PSTEX_T) |
---|
[5] | 202 | @echo OBJ_PDF4EPS $(OBJ_PDF4EPS) |
---|
[2] | 203 | @echo OBJ_PDF $(OBJ_PDF) |
---|
| 204 | |
---|
| 205 | clean: |
---|
| 206 | @echo '############################################################' |
---|
| 207 | @echo '#### Nettoyage' |
---|
| 208 | @echo '############################################################' |
---|
| 209 | $(RM) $(DOCUMENT).aux \ |
---|
| 210 | $(DOCUMENT).log \ |
---|
| 211 | $(DOCUMENT).bbl \ |
---|
| 212 | $(DOCUMENT).blg \ |
---|
| 213 | $(DOCUMENT).brf \ |
---|
| 214 | $(DOCUMENT).cb \ |
---|
| 215 | $(DOCUMENT).ind \ |
---|
| 216 | $(DOCUMENT).idx \ |
---|
| 217 | $(DOCUMENT).ilg \ |
---|
| 218 | $(DOCUMENT).dvi \ |
---|
| 219 | $(DOCUMENT).inx \ |
---|
| 220 | $(DOCUMENT).toc \ |
---|
| 221 | $(DOCUMENT).out \ |
---|
| 222 | $(DOCUMENT).lof \ |
---|
| 223 | $(DOCUMENT).lot \ |
---|
| 224 | $(DOCUMENT).pdf \ |
---|
| 225 | $(OBJ_PSTEX) \ |
---|
| 226 | $(OBJ_PSTEX_T) \ |
---|
| 227 | $(OBJ_PDF) \ |
---|
| 228 | $(DIR_PDF)/$(DOCUMENT).pdf \ |
---|
| 229 | $(DIR_TMP)/* |
---|
| 230 | |
---|
| 231 | miniclean: |
---|
| 232 | @echo '############################################################' |
---|
| 233 | @echo '#### Nettoyage tres partiel' |
---|
| 234 | @echo '############################################################' |
---|
| 235 | $(RM) $(DIR_TMP)/$(DOCUMENT).aux \ |
---|
| 236 | $(DIR_TMP)/$(DOCUMENT).toc \ |
---|
| 237 | $(DIR_TMP)/$(DOCUMENT).lof |
---|
| 238 | |
---|
| 239 | #--------------------------------------------------------------# |
---|
| 240 | |
---|
[5] | 241 | figure: $(OBJ_PDF) $(OBJ_PDFTEX_T) $(OBJ_EPS) $(OBJ_PSTEX_T) $(OBJ_PDF4EPS) |
---|
[2] | 242 | @echo '############################################################' |
---|
| 243 | @echo '#### Fin des figures' |
---|
| 244 | @echo '############################################################' |
---|
| 245 | |
---|
| 246 | #--------------------------------------------------------------# |
---|
| 247 | |
---|
| 248 | protect: |
---|
| 249 | $(BIN_PROTECT) |
---|
| 250 | @echo '############################################################' |
---|
| 251 | @echo '#### Mise en place de la protection du dossier source' |
---|
| 252 | @echo '############################################################' |
---|
| 253 | |
---|
| 254 | unprotect: |
---|
| 255 | $(BIN_UNPROTECT) |
---|
| 256 | @echo '############################################################' |
---|
| 257 | @echo '#### Suppression de la protection du dossier source' |
---|
| 258 | @echo '############################################################' |
---|
| 259 | |
---|
| 260 | #--------------------------------------------------------------# |
---|
| 261 | |
---|
[6] | 262 | pdflatex: folder figure |
---|
[2] | 263 | @echo '############################################################' |
---|
| 264 | @echo '#### Debut du formateur pdflatex' |
---|
| 265 | @echo '############################################################' |
---|
| 266 | $(BIN_PROTECT) |
---|
| 267 | $(PDFTEXPRE) $(PDFTEX) $(DOCUMENT).tex; true |
---|
| 268 | $(BIN_UNPROTECT) |
---|
| 269 | @echo '############################################################' |
---|
| 270 | @echo '#### Fin du formateur pdflatex' |
---|
| 271 | @echo '############################################################' |
---|
| 272 | |
---|
| 273 | latex: figure |
---|
| 274 | @echo '############################################################' |
---|
| 275 | @echo '#### Debut du formateur latex' |
---|
| 276 | @echo '############################################################' |
---|
| 277 | $(BIN_PROTECT) |
---|
| 278 | $(PDFTEXPRE) $(LATEX) -src $(DOCUMENT).tex; true |
---|
| 279 | $(BIN_UNPROTECT) |
---|
| 280 | @echo '############################################################' |
---|
| 281 | @echo '#### Fin du formateur latex' |
---|
| 282 | @echo '############################################################' |
---|
| 283 | |
---|
| 284 | bibtex: |
---|
| 285 | @echo '############################################################' |
---|
| 286 | @echo '#### Debut de la bibliographie' |
---|
| 287 | @echo '############################################################' |
---|
[5] | 288 | $(BIBTEXPRE) $(BIBTEX) $(OBJ_BASE) |
---|
[2] | 289 | @echo '############################################################' |
---|
| 290 | @echo '#### Fin de la bibliographie' |
---|
| 291 | @echo '############################################################' |
---|
| 292 | |
---|
| 293 | #--------------------------------------------------------------# |
---|
| 294 | |
---|
| 295 | help: |
---|
| 296 | @echo '############################################################' |
---|
| 297 | @echo '# all -> compilation complete' |
---|
[6] | 298 | @echo '# folder -> création des dossiers du projet' |
---|
[2] | 299 | @echo '# clean -> nettoyage partiel' |
---|
| 300 | @echo '# pdf -> compilation simple avec dependance -> pdf' |
---|
| 301 | @echo '# dvi -> compilation simple avec dependance -> dvi' |
---|
| 302 | @echo '# xpdf -> visualisation du resultat pdf' |
---|
| 303 | @echo '# xdvi -> visualisation du resultat dvi' |
---|
| 304 | @echo '# gv -> visualisation du resultat ps' |
---|
| 305 | @echo '# warning -> liste de tous les warnings' |
---|
| 306 | @echo '# review -> liste de toutes les remarques' |
---|
| 307 | @echo '# pdflatex -> compilation du source tex -> pdf' |
---|
| 308 | @echo '# latex -> compilation du source tex -> dvi' |
---|
| 309 | @echo '# bibtex -> compilation du source bibtex' |
---|
| 310 | @echo '# protect -> protection du dossier source' |
---|
| 311 | @echo '# unprotect -> suppression de la protection' |
---|
| 312 | @echo '############################################################' |
---|
| 313 | |
---|
| 314 | #--------------------------------------------------------------# |
---|
| 315 | |
---|
| 316 | pdf: $(DIR_TMP)/pdf.ok |
---|
| 317 | |
---|
| 318 | dvi: $(DIR_TMP)/dvi.ok |
---|
| 319 | |
---|
| 320 | $(DIR_TMP)/pdf.ok: $(DOCUMENT).tex $(SRC_TEX) $(OBJ_PDF) $(OBJ_PDFTEX_T) |
---|
| 321 | make pdflatex |
---|
| 322 | touch $< |
---|
| 323 | |
---|
| 324 | $(DIR_TMP)/dvi.ok: $(DOCUMENT).tex $(SRC_TEX) $(OBJ_EPS) $(OBJ_PSTEX_T) |
---|
| 325 | make latex |
---|
| 326 | touch $< |
---|
| 327 | |
---|
| 328 | ################################################################ |
---|
| 329 | |
---|
| 330 | $(DIR_TMP)/$(DOCUMENT).pdf: $(DOCUMENT).tex $(SRC_BIB) $(SRC_TEX) $(OBJ_PDF) $(OBJ_PSTEX_T) |
---|
| 331 | $(COPYTOC) |
---|
| 332 | make pdflatex |
---|
| 333 | egrep -c $(RERUNBIB) $(OBJ_BASE).log && (make bibtex;$(COPYTOC); make pdflatex); true |
---|
| 334 | egrep $(RERUNTEX) $(OBJ_BASE).log && ($(COPYTOC); make pdflatex); true |
---|
| 335 | egrep $(RERUNTEX) $(OBJ_BASE).log && ($(COPYTOC); make pdflatex); true |
---|
| 336 | if cmp -s $(OBJ_BASE).toc $(OBJ_BASE).toc.bak; then echo 'end'; else make pdflatex; fi |
---|
| 337 | $(RM) $(OBJ_BASE).toc.bak |
---|
| 338 | # egrep -i "(Reference|Citation).*undefined" $(OBJ_BASE).log; true |
---|
| 339 | # Display relevant warnings |
---|
| 340 | |
---|
| 341 | ################################################################ |
---|
| 342 | |
---|
| 343 | ################################################################ |
---|
| 344 | |
---|
| 345 | $(DIR_TMP)/$(DOCUMENT).dvi: $(DOCUMENT).tex $(SRC_BIB) $(SRC_TEX) $(OBJ_EPS) $(OBJ_PSTEX_T) |
---|
| 346 | $(COPYTOC) |
---|
| 347 | make latex |
---|
| 348 | egrep -c $(RERUNBIB) $(OBJ_BASE).log && (make bibtex;$(COPYTOC); make latex); true |
---|
| 349 | egrep $(RERUNTEX) $(OBJ_BASE).log && ($(COPYTOC); make latex); true |
---|
| 350 | egrep $(RERUNTEX) $(OBJ_BASE).log && ($(COPYTOC); make latex); true |
---|
| 351 | if cmp -s $(OBJ_BASE).toc $(OBJ_BASE).toc.bak; then echo 'end'; else make latex; fi |
---|
| 352 | $(RM) $(OBJ_BASE).toc.bak |
---|
| 353 | # egrep -i "(Reference|Citation).*undefined" $(OBJ_BASE).log; true |
---|
| 354 | # Display relevant warnings |
---|
| 355 | |
---|
| 356 | ################################################################ |
---|
| 357 | |
---|
| 358 | #$(DIR_PS)/%.ps: $(DIR_PDF)/%.pdf |
---|
| 359 | # pdftops $< $@ |
---|
| 360 | |
---|
| 361 | |
---|
| 362 | $(DIR_PS)/%.ps: $(DIR_TMP)/%.dvi |
---|
| 363 | $(PDFTEXPRE) |
---|
| 364 | dvips $< -o $@ |
---|
| 365 | |
---|
| 366 | $(DIR_PDF)/%.pdf: $(DIR_TMP)/%.pdf |
---|
| 367 | echo --- |
---|
| 368 | rm -f $@ |
---|
| 369 | echo --- |
---|
| 370 | cp $< $@ |
---|
| 371 | # ln -f $< $@ |
---|
| 372 | # je sais pas pourquoi mais le lien ne marche pas bien avec le make |
---|
| 373 | |
---|
| 374 | ################################################################ |
---|
| 375 | # figure |
---|
| 376 | |
---|
| 377 | #$(DIR_TMP)/%.pdf: $(DIR_TMP)/%.pstex $(DIR_TMP)/%.pstex_t |
---|
| 378 | # ps2pdf $< $@ |
---|
| 379 | # cd $(DIR_TMP); \ |
---|
| 380 | # sed 's/\.pstex/.pdf/' $*.pstex_t > $*.tmp; \ |
---|
| 381 | # mv $*.tmp $*.pstex_t; \ |
---|
| 382 | # sed 's/\\epsfig{file=/\\includegraphics{/' $*.pstex_t > $*.tmp; \ |
---|
| 383 | # mv $*.tmp $*.pstex_t |
---|
| 384 | |
---|
| 385 | $(DIR_TMP)/%.pstex: %.fig |
---|
| 386 | fig2dev -L pstex $< $@ |
---|
| 387 | |
---|
| 388 | $(DIR_TMP)/%.eps: %.fig |
---|
| 389 | fig2dev -L pstex $< $@ |
---|
| 390 | |
---|
| 391 | $(DIR_TMP)/%.pstex_t: %.fig $(DIR_TMP)/%.pstex |
---|
| 392 | fig2dev -L pstex_t -p $* $< $@ |
---|
| 393 | # fig2dev -L pstex_t -E 1 -p $* $< $@ |
---|
| 394 | |
---|
| 395 | #$(DIR_TMP)/%.pstex_t: $(DIR_TMP)/%.pstex %.fig |
---|
| 396 | # fig2dev -L pstex_t -p $^ $@ |
---|
| 397 | |
---|
[5] | 398 | $(DIR_TMP)/%.pdf: %.eps |
---|
| 399 | @echo eps2pdf $< $@ |
---|
| 400 | epstopdf $< --outfile $@ |
---|
| 401 | |
---|
[2] | 402 | ifeq "$(QUIX)" "A.linux" |
---|
| 403 | $(DIR_TMP)/%.pdftex: %.fig |
---|
| 404 | fig2dev -L pdftex $< $@ |
---|
| 405 | endif |
---|
| 406 | ifeq "$(QUIX)" "A.darwin" |
---|
| 407 | $(DIR_TMP)/%.pdftex: %.fig |
---|
| 408 | fig2dev -L pstex $< $(patsubst %.pdftex,%.pstex,$@) |
---|
| 409 | ps2pdf $(patsubst %.pdftex,%.pstex,$@) $@ |
---|
| 410 | endif |
---|
| 411 | |
---|
| 412 | ifeq "$(QUIX)" "A.linux" |
---|
| 413 | $(DIR_TMP)/%.pdf: %.fig |
---|
| 414 | fig2dev -L pdftex $< $@ |
---|
| 415 | endif |
---|
| 416 | ifeq "$(QUIX)" "A.darwin" |
---|
| 417 | $(DIR_TMP)/%.pdf: %.fig |
---|
| 418 | fig2dev -L pstex $< $(patsubst %.pdf,%.eps,$@) |
---|
| 419 | ps2pdf $(patsubst %.pdf,%.eps,$@) $@ |
---|
| 420 | endif |
---|
| 421 | |
---|
| 422 | $(DIR_TMP)/%.pdftex_t: %.fig $(DIR_TMP)/%.pdftex |
---|
| 423 | fig2dev -L pdftex_t -p $* $< $@ |
---|
| 424 | # fig2dev -L pdftex_t -E 1 -p $* $< $@ |
---|
| 425 | |
---|
| 426 | ################################################################ |
---|
| 427 | # dossier |
---|
| 428 | |
---|
| 429 | $(DIR_DOC): |
---|
| 430 | mkdir -p $@ |
---|
| 431 | chmod ugo+rx $@ |
---|
| 432 | |
---|
| 433 | $(DIR_TMP): |
---|
| 434 | mkdir -p $@ |
---|
| 435 | chmod ugo+rwx $@ |
---|
| 436 | |
---|
| 437 | $(DIR_PS): $(DIR_DOC) |
---|
| 438 | mkdir -p $@ |
---|
| 439 | chmod ugo+rx $@ |
---|
| 440 | |
---|
| 441 | $(DIR_PDF): $(DIR_DOC) |
---|
| 442 | mkdir -p $@ |
---|
| 443 | chmod ugo+rx $@ |
---|
| 444 | |
---|
| 445 | $(DIR_HTML): $(DIR_DOC) |
---|
| 446 | mkdir -p $@ |
---|
| 447 | chmod ugo+rx $@ |
---|