forked from ropensci-archive/rcol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (33 loc) · 1.1 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
PACKAGE := $(shell grep '^Package:' DESCRIPTION | sed -E 's/^Package:[[:space:]]+//')
RSCRIPT = Rscript --no-init-file
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
doc:
${RSCRIPT} -e 'devtools::document()'
build:
R CMD BUILD .
install: doc build
R CMD INSTALL . && rm *.tar.gz
installvign:
${RSCRIPT} -e 'devtools::install(build_vignettes=TRUE)'
readme: README.Rmd
${RSCRIPT} -e "knitr::knit('$<')"
eg:
${RSCRIPT} -e "devtools::run_examples(run = TRUE)"
checkwin:
${RSCRIPT} -e "devtools::check_win_devel(quiet = TRUE); devtools::check_win_release(quiet = TRUE)"
test:
${RSCRIPT} -e "devtools::test()"
vign:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('rcol.Rmd.og', output = 'rcol.Rmd')";\
cd ..
# update api spec and params in functions
spec_update:
${RSCRIPT} -e "source('inst/scripts/update_spec.R')"
spec_pkg_update:
${RSCRIPT} -e "source('inst/scripts/update_package.R')"
# No real targets!
.PHONY: all check document install