forked from traitecoevo/plant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (44 loc) · 1.49 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
PACKAGE := $(shell grep '^Package:' DESCRIPTION | sed -E 's/^Package:[[:space:]]+//')
RSCRIPT = Rscript --no-init-file
all: compile
rebuild: clean RcppR6 full_compile roxygen
compile:
Rscript -e 'pkgbuild::compile_dll(compile_attributes = FALSE, debug=FALSE)'
debug: RcppR6
Rscript -e 'pkgbuild::compile_dll(debug=TRUE)' \
make roxygen
# compared to compile, also generates src/RcppExports.cpp, R/RcppExports.R
full_compile:
Rscript -e 'pkgbuild::compile_dll(debug=FALSE)'
# generates
RcppR6:
Rscript -e "library(methods); RcppR6::RcppR6()"
# generates src/RcppExports.cpp, R/RcppExports.R from anything with Rcpp::export.
attributes:
Rscript -e "Rcpp::compileAttributes()"
# generates documentation
roxygen:
@mkdir -p man
Rscript -e "library(methods); devtools::document()"
test:
Rscript -e 'library(methods); devtools::test()'
benchmark:
Rscript scripts/benchmark.R
install:
R CMD INSTALL .
build:
R CMD build --no-build-vignettes .
check: build
R CMD check --no-build-vignettes --no-manual `ls -1tr ${PACKAGE}*gz | tail -n1`
@rm -f `ls -1tr ${PACKAGE}*gz | tail -n1`
@rm -rf ${PACKAGE}.Rcheck
clean:
rm -f src/*.o src/*.so src/*.o.tmp
slow_vignettes:
(cd inst/slow_vignettes; ln -sfn ../../vignettes vignettes; remake update_vignettes)
vignettes:
Rscript -e "devtools::build_vignettes()"
website: vignettes
Rscript -e "pkgdown::build_site()" /
open "inst/website/index.html"
.PHONY: all compile doc clean test attributes roxygen install build check vignettes website push_website