-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
102 lines (77 loc) · 2.91 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
all: clean initc docs test check
clean:
rm -rf man/*
rm -rf data/*
rm -rf docs/*
rm -rf inst/doc/*
docs: man readme vigns site
man:
R --slave -e "devtools::document()"
readme:
R --slave -e "rmarkdown::render('README.Rmd')"
test:
R --slave -e "devtools::test()" > test.log 2>&1
rm -f tests/testthat/Rplots.pdf
vigns:
R --slave -e "devtools::build_vignettes()"
cp -R doc inst/
quicksite:
R --slave -e "pkgdown::build_site(run_dont_run = TRUE, lazy = TRUE)"
site:
R --slave -e "pkgdown::clean_site()"
R --slave -e "pkgdown::build_site(run_dont_run = TRUE, lazy = FALSE)"
quickcheck:
echo "\n===== R CMD CHECK =====\n" > check.log 2>&1
R --slave -e "devtools::check(build_args = '--no-build-vignettes', args = '--no-build-vignettes', run_dont_test = TRUE, vignettes = FALSE)" >> check.log 2>&1
cp -R doc inst/
check:
echo "\n===== R CMD CHECK =====\n" > check.log 2>&1
R --slave -e "devtools::check(build_args = '--no-build-vignettes', args = '--no-build-vignettes', run_dont_test = TRUE, vignettes = FALSE)" >> check.log 2>&1
cp -R doc inst/
wbcheck:
R --slave -e "devtools::check_win_devel()"
cp -R doc inst/
solarischeck:
R --slave -e "rhub::check(platform = 'solaris-x86-patched', email = '[email protected]', show_status = FALSE)"
maccheck:
R --slave -e "devtools::check_mac_release()"
build:
R --slave -e "devtools::build()"
cp -R doc inst/
install:
R --slave -e "devtools::install_local(force = TRUE)"
spellcheck:
echo "\n===== SPELL CHECK =====\n" > spell.log 2>&1
R --slave -e "devtools::spell_check()" >> spell.log 2>&1
urlcheck:
R --slave -e "devtools::document();urlchecker::url_check()"
purl_vigns:
R --slave -e "lapply(dir('vignettes', '^.*\\\\.Rmd$$'), function(x) knitr::purl(file.path('vignettes', x), gsub('.Rmd', '.R', x, fixed = TRUE)))"
rm -f Rplots.pdf
examples:
R --slave -e "devtools::run_examples(run_donttest = TRUE, run_dontrun = TRUE);warnings()" >> examples.log
rm -f Rplots.pdf
paper: paper/paper.pdf paper/paper.docx
paper/paper.pdf: paper/paper.Rmd paper/paper.bib paper/carbon.png
rm -f paper/paper.pdf
rm -f paper/paper.md
R --slave -e "rmarkdown::render('paper/paper.Rmd', output_file = 'paper.pdf')"
rm -f paper/paper.knit.md
rm -f paper/paper.log
rm -f paper/paper.tex
rm -f paper/paper.pdf
docker run --rm \
--volume $(PWD)/paper:/data \
--user $(id -u):$(id -g) \
--env JOURNAL=joss \
openjournals/inara
rm -f paper/paper.jats
paper/paper.docx: paper/paper.pdf
R --slave -e "rmarkdown::render('paper/paper.Rmd', output_file = 'paper.docx', output_format = 'word_document')"
paper_case_study:
R CMD BATCH --no-restore --no-save paper/case-study.R
mv case-study.Rout paper/case-study.Rout
rm -f Rplots.pdf
wdpa_global:
R CMD BATCH --no-restore --no-save inst/scripts/global-example-script.R
.PHONY: initc vigns clean data docs readme site test check checkwb build install man spellcheck examples wdpa_global paper purl_vigns paper_case_study