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