-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
52 lines (38 loc) · 1.02 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
PKGNAME = `sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION`
PKGVERS = `sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION`
all: check clean
activate:
Rscript -e 'source("renv/activate.R")'
build: activate document
@rm -rf bin
@mkdir bin
Rscript \
-e 'devtools::build(path = "bin", binary = F, vignettes = T, manual = T)'
binary: activate document
@rm -rf bin
@mkdir bin
Rscript \
-e 'devtools::build(path = "bin", binary = T, vignettes = T, manual = T)'
document: activate
Rscript \
-e 'devtools::document()'
check: activate document
Rscript \
-e 'options(crayon.enabled = TRUE)' \
-e 'rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")'
restore: activate
Rscript \
-e 'source("renv/activate.R")' \
-e 'renv::restore()'
lint:
Rscript \
-e 'lintr::lint_package()'
covr:
Rscript \
-e 'covr::report()'
install: build
R CMD INSTALL bin/$(PKGNAME)_$(PKGVERS).tar.gz
clean:
@rm -rf $(PKGNAME)_$(PKGVERS).tar.gz $(PKGNAME).Rcheck
@rm -rf check
@rm -rf bin