-
Notifications
You must be signed in to change notification settings - Fork 38
/
Makefile
55 lines (48 loc) · 1.47 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#############################################################
## Makefile to execute systemPipeR and generate PDF Report ##
#############################################################
## Usage:
## (1) Change value assigned to 'MAIN" to base name of your *.Rmd source file
## (2) To run workflow, execute from command-line
## $ make # or make all
## (3) To clean up directory, execute from command-line
## $ make clean
## Define suffixes used for file interconversions
.SUFFIXES: .tex .pdf .Rnw .R .Rmd
MAIN = systemPipeR
#######################################
## Build PDF report with Rmd/Latex ##
#######################################
all: $(MAIN).pdf
.Rmd.pdf:
Rscript -e "rmarkdown::render('$<', c('BiocStyle::pdf_document'))"
#######################################
## Build PDF report with knitr/Latex ##
#######################################
# all: $(MAIN).pdf
#
# .Rnw.pdf:
# R CMD Sweave --engine=knitr::knitr --pdf $<
########################################
## Build PDF report with Sweave/Latex ##
########################################
# all: $(MAIN).tex $(MAIN).R $(MAIN).pdf
#
# .Rnw.R:
# R CMD Stangle $<
#
# .Rnw.tex:
# R CMD Sweave $<
#
# .tex.pdf:
# pdflatex $<
# bibtex $*
# pdflatex $<
# pdflatex $<
########################
## Clean-up directory ##
########################
clean:
rm -fv $(MAIN).aux $(MAIN).log $(MAIN).bbl $(MAIN).blg $(MAIN).out $(MAIN).toc $(MAIN).tex
rm -fv $(MAIN)-*.pdf $(MAIN)-*.png $(MAIN)-*.jpg $(MAIN)-*.html
rm -fv *~