cours-act-2010-exercices/Makefile

43 lines
1.1 KiB
Makefile
Raw Normal View History

2020-01-02 22:35:21 +00:00
# This makefile provides three targets: tex, pdf and clean.
# The default is "pdf".
# To make a tex file type "make tex"
# To make a pdf file, type "make pdf" or simply "make".
# To remove all files generated by make, type "make clean".
#
# Rouben Rostmaian, minor adjustments for Rnw Nicholas Lewin-koh
# September 2002 March 2005
# Further adjustments Vincent Goulet
# April 2008
# Minor adjustments for Linux François Pelletier
# December 2013
MASTER = exercices_series_chrono.pdf
# The master document depends on all TeX files
RNWFILES = $(wildcard *.Rnw)
TEXFILES = $(wildcard *.tex)
# The work horses
SWEAVE = R CMD Sweave --encoding=utf8
TEXI2DVI = texi2dvi -b --pdf
RM = rm -rf
.PHONY: tex pdf clean
pdf: $(MASTER)
tex: $(RNWFILES:.Rnw=.tex)
%.tex: %.Rnw
$(SWEAVE) '$<'
$(MASTER): $(RNWFILES) $(TEXFILES)
$(TEXI2DVI) $(MASTER:.pdf=.tex)
clean:
$(RM) $(RNWFILES:.Rnw=.tex) \
*-[0-9][0-9][0-9].eps \
*-[0-9][0-9][0-9].pdf \
*.aux *.log *.blg *.bbl *.out *.rel *.t2d *.toc *~ Rplots.ps Rplots.pdf
$(RM) exercice1-*.pdf serie*.tex