-
Notifications
You must be signed in to change notification settings - Fork 4
/
rnoaa-Makefile
76 lines (58 loc) · 2.04 KB
/
rnoaa-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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
PACKAGE := $(shell grep '^Package:' DESCRIPTION | sed -E 's/^Package:[[:space:]]+//')
RSCRIPT = Rscript --no-init-file
vign:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('rnoaa.Rmd.og', output = 'rnoaa.Rmd')";\
cd ..
vign_ncdc:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('ncdc_vignette.Rmd.og', output = 'ncdc_vignette.Rmd')";\
cd ..
vign_ncdc_attr:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('ncdc_attributes.Rmd.og', output = 'ncdc_attributes.Rmd')";\
cd ..
vign_ncdc_workflow:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('ncdc_workflow.Rmd.og', output = 'ncdc_workflow.Rmd')";\
cd ..
vign_swdi:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('swdi_vignette.Rmd.og', output = 'swdi_vignette.Rmd')";\
cd ..
vign_seaice:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('seaice_vignette.Rmd.og', output = 'seaice_vignette.Rmd')";\
cd ..
vign_homr:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('homr_vignette.Rmd.og', output = 'homr_vignette.Rmd')";\
cd ..
vign_buoy:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('buoy_vignette.Rmd.og', output = 'buoy_vignette.Rmd')";\
cd ..
vign_ropenaq:
cd vignettes;\
${RSCRIPT} -e "Sys.setenv(NOT_CRAN='true'); knitr::knit('rnoaa_ropenaq.Rmd.og', output = 'rnoaa_ropenaq.Rmd')";\
cd ..
revdep:
${RSCRIPT} -e "revdepcheck::revdep_reset(); revdepcheck::revdep_check()"
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
check_windows:
${RSCRIPT} -e "devtools::check_win_devel(); devtools::check_win_release()"
test:
${RSCRIPT} -e "devtools::test()"
readme:
${RSCRIPT} -e "knitr::knit('README.Rmd')"