-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (34 loc) · 1.57 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
.PHONY: all clean install check test
# ROOT_DIR:=$(shell dirname "$(realpath $(firstword $(MAKEFILE_LIST)))")
rmds := $(wildcard vignettes/articles/*.Rmd)
articles = $(rmds:.Rmd=.html)
css = vignettes/articles/custom.css
mans := $(wildcard man/*.Rd)
all: README.md docs/index.html
clean:
rm -rf docs/ README_{files,cache} README.{md,html} index.{md,html} vignettes/articles/examples_{files,cache} vignettes/articles/*.html
install:
R -e 'devtools::document(); devtools::install()'
check:
R -e 'devtools::document(); rcmdcheck::rcmdcheck(args="--no-tests")'
cran:
R -e 'devtools::document(); rcmdcheck::rcmdcheck(args="--as-cran")'
test:
R -e 'devtools::test()'
README.md: README.Rmd $(articles)
# R -e 'devtools::install_deps(".", TRUE)'
R -e 'rmarkdown::render("README.Rmd", "all")'
index.md: index.Rmd $(articles)
R -e 'rmarkdown::render("index.Rmd", "md_document")'
vignettes/articles/%.html: vignettes/articles/%.Rmd $(css)
R -e 'devtools::build_rmd("$<")'
# vignettes/articles/examples.html: vignettes/articles/examples.Rmd vignettes/articles/custom.css
# R -e 'devtools::build_rmd("vignettes/articles/examples.Rmd")'
# vignettes/articles/visualize-hla-structure.html: vignettes/articles/visualize-hla-structure.Rmd
# R -e 'devtools::build_rmd("vignettes/articles/visualize-hla-structure.Rmd")'
# vignettes/articles/numbering.html: vignettes/articles/numbering.Rmd
# R -e 'devtools::build_rmd("vignettes/articles/numbering.Rmd")'
docs/index.html: index.md $(mans)
rm -rf docs/
R -e 'pkgdown::init_site(); pkgdown::build_articles(); pkgdown::build_site()'
rm -f docs/paper.*