-
Notifications
You must be signed in to change notification settings - Fork 58
/
Makefile
38 lines (28 loc) · 904 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
vign_elastic:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('elastic.Rmd.og', output = 'elastic.Rmd')";\
cd ..
vign_search:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('search.Rmd.og', output = 'search.Rmd')";\
cd ..
install: doc build
R CMD INSTALL . && rm *.tar.gz
build:
R CMD build .
doc:
${RSCRIPT} -e "devtools::document()"
eg:
${RSCRIPT} -e "devtools::run_examples(run = TRUE)"
check: build
_R_CHECK_CRAN_INCOMING_=FALSE R CMD CHECK --as-cran --no-manual `ls -1tr ${PACKAGE}*gz | tail -n1`
@rm -f `ls -1tr ${PACKAGE}*gz | tail -n1`
@rm -rf ${PACKAGE}.Rcheck
test:
${RSCRIPT} -e "devtools::test()"
pkgdocs:
${RSCRIPT} -e "pkgdown::build_site()"
readme:
${RSCRIPT} -e "knitr::knit('README.Rmd')"