-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
59 lines (43 loc) · 1.58 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
56
57
58
59
RSCRIPT = Rscript --no-init-file
test:
${RSCRIPT} -e "library(methods); devtools::test()"
roxygen:
@mkdir -p man
${RSCRIPT} -e "library(methods); devtools::document()"
install:
R CMD INSTALL .
build:
R CMD build .
check:
_R_CHECK_CRAN_INCOMING_=FALSE make check_all
check_all:
${RSCRIPT} -e "rcmdcheck::rcmdcheck(args = c('--as-cran', '--no-manual'))"
pkgdown:
Rscript -e "library(methods); pkgdown::build_site()"
website: vignettes_rmd pkgdown
./scripts/update_web.sh
vignettes_rmd: vignettes/model-workflow.Rmd
vignettes_src/model-workflow.Rmd: vignettes_src/model-workflow.R
${RSCRIPT} -e 'knitr::spin("$<", knit=FALSE)'
vignettes/model-workflow.Rmd: vignettes_src/model-workflow.Rmd
rm -rf vignettes_src/cache
cd vignettes_src && ${RSCRIPT} -e 'knitr::knit("model-workflow.Rmd")'
mv vignettes_src/model-workflow.md $@
mv vignettes_src/figure vignettes/
vignettes/data-model.Rmd: vignettes_src/data-model.Rmd
cp $^ $@
mkdir -p vignettes/figure
./vignettes/script/create_data_model.R
vignettes/hintr-example.Rmd: vignettes_src/hintr-example.R
${RSCRIPT} -e 'knitr::spin("$<", knit=FALSE)'
vignettes_install: vignettes/model-workflow.Rmd vignettes/data-model.Rmd vignettes/hintr-example.Rmd
${RSCRIPT} -e 'tools::buildVignettes(dir = ".")'
vignettes:
rm -rf vignettes/figure
rm -rf vignettes_src/outputs
rm -f vignettes/data-model.Rmd
rm -f vignettes/hintr-example.Rmd
rm -f vignettes/model-workflow.Rmd
rm -f vignettes_src/model-workflow.Rmd
make vignettes_install
.PHONY: test roxygen install build check check_all pkgdown website vignettes vignettes_rmd vignettes_install