## ## Makefile for Business plan in Business week ## ## Made by Marco Tessari ## Modified by Jérôme Pouiller ## Login ## Login ## # C'est un Makefile que j'ai adapté a l'arrache, docn, ne lui faite pas # confiance aveuglement (surtout vu la complexité de la chaine de # compilation Latex et son incompatibilité avec les systèmes Makefile) RM = rm -f # put here basename of your final document ALL = report # Source files SRC = $(shell ls *.tex) # automatically scan sources. gmake only compliant # put all you non .tex sources here (include bibliography, pictures, etc...) SRC += xreport.cls #QUIET = > /dev/null 2> /dev/null #QUIETMK =--silent HVA_FLAGS=-fix -francais default: pdf .SUFFIXES: .pdf .ps .dvi .txt .info .html .tex .bib \ .eps .jpg .tif .bmp .png .pnm \ .toc .aux .bbl .check .haux .htoc .PHONY: default all cv web images pdf ps dvi html txt \ text info check jpg tif bmp png pnm print \ view viewpdf viewps viewdvi clean distclean all: dvi pdf ps html txt #images: png pnm jpg tif bmp pdf: ./latexmk.pl $(QUIETMK) -i -I -pdf $(ALL) ps: ./latexmk.pl $(QUIETMK) -i -I -ps $(ALL) dvi: ./latexmk.pl $(QUIETMK) $(ALL) html: $(ALL:=.html) $(SRC) text: txt $(SRC) txt: $(ALL:=.txt) $(SRC) info: $(ALL:=.info) $(SRC) pnm: $(ALL:=.pnm) $(SRC) png: $(ALL:=.png) $(SRC) jpg: $(ALL:=.jpg) $(SRC) tif: $(ALL:=.tif) $(SRC) bmp: $(ALL:=.bmp) $(SRC) check: $(SRC:.tex=.check) print: $(ALL:=.pdf) $(SRC) lpr $< view: viewpdf viewdvi: $(ALL:=.dvi) $(SRC) xdvi $< & viewps: $(ALL:=.ps) $(SRC) gv $< & viewpdf: $(ALL:=.pdf) $(SRC) xpdf $< & clean: $(RM) *.aux *.log *.out *.toc *~ *.bmt *.mtc* \ *.bbl *.bak *.dep *.tmp *.blg *.haux *.htoc *.image.* *.[0-9] distclean: clean $(RM) *.dvi *.ps *.pdf *.html *.info *.txt # *.png *.gif *.jpg *.bmp *.pnm *.tif .html.txt: links -dump $< > $@ .htoc.info: hevea -info $(HVA_FLAGS) $(<:.htoc=.tex) $(QUIET) .htoc.html: hevea $(HVA_FLAGS) $(<:.htoc=.tex) $(QUIET) imagen -png $(<:.htoc=) $(QUIET) .tex.dvi: ./latexmk.pl $(QUIETMK) $< .tex.ps: ./latexmk.pl $(QUIETMK) -i -I -ps $< ## Use of pdflatex by default .tex.pdf: ./latexmk.pl $(QUIETMK) -i -I -pdf $< #.dvi.pdf: # dvipdf $< $(QUIET) .tex.htoc: hevea $< $(QUIET) .ps.png .ps.bmp .ps.pnm .ps.jpg .ps.tif: file=`echo $@ | sed 's/\(.*\)\.\(png\|bmp\|pnm\|jpg\|tif\)/\1/'`; \ suf=`echo $@ | sed 's/\(.*\)\.\(png\|bmp\|pnm\|jpg\|tif\)/\2/'`; \ rm -f $@.[0-9] $@ $$file-[0-9].$$suf convert -density 144x144 $< $@ if [ -f $@.0 ]; then \ for i in $@.[0-9]; do \ mv $$i `echo $$i | sed 's/\(.*\)\.\(png\|bmp\|pnm\|jpg\|tif\)\.\([0-9]\)/\1-\3.\2/'`; \ done; \ ln -s `echo $@ | sed 's/\(.*\)\.\(png\|bmp\|pnm\|jpg\|tif\)/\1-0.\2/'` $@; \ fi # Fake rule for check .tex.check: aspell check --lang=francais $<