-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
38 lines (27 loc) · 890 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
PACKAGE := $(shell grep '^Package:' DESCRIPTION | sed -E 's/^Package:[[:space:]]+//')
RSCRIPT = Rscript --no-init-file
all: install
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()"
rm -f README.html
README.md: README.Rmd
Rscript -e 'library(methods); devtools::load_all(); knitr::knit("README.Rmd")'
sed -i.bak 's/[[:space:]]*$$//' $@
rm -f [email protected]
vignettes: vignettes/cyphr.Rmd vignettes/data.Rmd
${RSCRIPT} -e 'library(methods); devtools::build_vignettes()'
# No real targets!
.PHONY: all test document install vignettes pkgdown