# Un makefile (experimental) pour les documents latex avec bibtex. # removes automatic rules : .SUFFIXES: .PHONY : default help clean veryclean default : rapport-biblio.ps LATEX=latex DVIPS=dvips #DVIPS=a2ps -2 --sides=duplex #BIBDIR=$(BIBINPUTS) BIBDIR=~/Biblio BIBFILES=$(BIBDIR)/bibliographie_articles.bib $(BIBDIR)/bibliographie_books.bib $(BIBDIR)/bibliographie_thesis.bib #BIBFILES=$(BIBDIR)/*.bib rapport-biblio.dvi : *.tex help: @echo "Makefile generique pour les fichiers LaTex" @echo "cibles : clean, veryclean, *.dvi" clean: -\rm -f *~ *.log *.aux *.toc *.ilg *.idx *.ind *.bbl *.blg *.lof *.lot *.dvi veryclean:clean Poubelle -\mv *.pdf *.ps Poubelle/ #amelioration : tester l'existence des fichiers *.pdf,... histoire d'eviter les affichages du genre "rm: cannot lstat `*.ps': No such file or directory" # Automatic rules (pattern) Poubelle : mkdir $@ %.dvi : %.tex %.bbl #technique bourrin : # -$(LATEX) "\scrollmode\input $*.tex" >/dev/null # -$(LATEX) "\scrollmode\input $*.tex" >/dev/null $(LATEX) $*.tex >/dev/null $(LATEX) $*.tex >/dev/null $(LATEX) $*.tex %.bbl : %.aux $(BIBFILES) bibtex $* # @echo "les dependances : " $^ %.aux : %.tex # -$(LATEX) "\scrollmode\input $*.tex" >/dev/null $(LATEX) $*.tex >/dev/null %.pdf : %.dvi dvipdf $*.dvi %.ps : %.dvi $(DVIPS) $*.dvi -o $*.ps # a2ps -2 --sides=duplex $*.dvi -o $*.ps # dvips $*.dvi -o $*.ps # dependencies :