-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
65 lines (46 loc) · 1.65 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
60
61
62
63
64
65
PACKAGE := $(shell grep '^Package:' DESCRIPTION | sed -E 's/^Package:[[:space:]]+//')
RSCRIPT = Rscript
all: install
test:
${RSCRIPT} -e 'library(methods); devtools::test()'
test_leaks: .valgrind_ignore
R -d 'valgrind --leak-check=full --suppressions=.valgrind_ignore' -e 'devtools::test()'
.valgrind_ignore:
R -d 'valgrind --leak-check=full --gen-suppressions=all --log-file=$@' -e 'library(testthat)'
sed -i.bak '/^=/ d' $@
$(RM) [email protected]
roxygen:
./scripts/update_dust_generator
@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'))"
README.md: README.Rmd
Rscript -e "options(warnPartialMatchArgs=FALSE); knitr::knit('$<')"
sed -i.bak 's/[[:space:]]*$$//' README.md
$(RM) [email protected]
pkgdown:
${RSCRIPT} -e "library(methods); pkgdown::build_site()"
website: pkgdown
./scripts/update_web.sh
clean:
$(RM) src/*.o src/dust.so src/dust.dll \
tests/testthat/example/*.o tests/testthat/example/*.so \
src/*.gcov src/*.gcda src/*.gcno
vignettes/gpu.Rmd: vignettes_src/gpu.Rmd
./scripts/build_vignette gpu
vignettes/rng_distributed.Rmd: vignettes_src/rng_distributed.Rmd
./scripts/build_vignette rng_distributed
vignettes/rng_package.Rmd: vignettes_src/rng_package.Rmd
./scripts/build_vignette rng_package
vignettes: vignettes/dust.Rmd vignettes/rng_package.Rmd vignettes/rng_distributed.Rmd
${RSCRIPT} -e 'tools::buildVignettes(dir = ".")'
mkdir -p inst/doc
cp vignettes/*.html vignettes/*.Rmd inst/doc
.PHONY: all test roxygen install vignettes pkgdown