-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
40 lines (28 loc) · 924 Bytes
/
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
PACKAGE := $(shell grep '^Package:' DESCRIPTION | sed -E 's/^Package:[[:space:]]+//')
RSCRIPT = Rscript --no-init-file
all:
${RSCRIPT} -e 'pkgbuild::compile_dll()'
test:
${RSCRIPT} -e 'devtools::test()'
goodpractice:
${RSCRIPT} -e 'check_vignettes = FALSE; source("scripts/goodpractice.R", echo = TRUE)'
goodpractice_vignette:
${RSCRIPT} -e 'check_vignettes = TRUE; source("scripts/goodpractice.R", echo = TRUE)'
roxygen:
@mkdir -p man
${RSCRIPT} -e "devtools::document()"
install:
R CMD INSTALL .
build:
R CMD build .
README.md: README.Rmd
Rscript -e 'devtools::load_all(); knitr::knit("README.Rmd")'
sed -i.bak 's/[[:space:]]*$$//' README.md
rm -f $@.bak
check:
_R_CHECK_CRAN_INCOMING_=FALSE make check_all
check_all:
${RSCRIPT} -e "rcmdcheck::rcmdcheck(args = c('--as-cran', '--no-manual'))"
clean:
rm -f src/*.o src/*.so src/*.gcda src/*.gcno src/*.gcov
.PHONY: clean all test document install