-
Notifications
You must be signed in to change notification settings - Fork 61
/
Makefile
57 lines (42 loc) · 1.55 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
PACKAGE := $(shell grep '^Package:' DESCRIPTION | sed -E 's/^Package:[[:space:]]+//')
RSCRIPT = Rscript --no-init-file
vign_taxize:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('taxize.Rmd.og', output = 'taxize.Rmd')";\
cd ..
vign_name_cleaning:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('name_cleaning.Rmd.og', output = 'name_cleaning.Rmd')";\
cd ..
vign_use_case:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('case_study.Rmd.og', output = 'case_study.Rmd')";\
cd ..
vign_datasources:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('datasources.Rmd.og', output = 'datasources.Rmd')";\
cd ..
vign_taxonomic_ranks:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('taxonomic_ranks.Rmd.og', output = 'taxonomic_ranks.Rmd')";\
cd ..
install_vign: doc build
${RSCRIPT} -e "Sys.setenv(NOT_CRAN = TRUE); library(devtools); document(); install(build_vignettes=TRUE, dependencies=FALSE)"
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()'
readme:
${RSCRIPT} -e 'knitr::knit("README.Rmd")'
check_windows:
${RSCRIPT} -e "devtools::check_win_devel(); devtools::check_win_release()"