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