-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (29 loc) · 1019 Bytes
/
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
PKG=${shell pwd}
PKGNAME=${shell basename ${PKG}}
R=R
RSCRIPT=@Rscript
all: clean doc install test
clean:
rm -f ${PKG}/man/*.Rd
rm -f ${PKG}/src/*.*o
rm -f ${PKG}/src/*.gcda
doc:
${RSCRIPT} -e "devtools::document(roclets = c('rd', 'collate', 'namespace'))" \
--default-packages=methods,utils,stats
install:
${RSCRIPT} -e "devtools::install()" \
--default-packages=methods,utils,stats
test:
${RSCRIPT} -e "devtools::test()" \
--default-packages=methods,utils,stats
coverage:
${RSCRIPT} -e "covr::package_coverage(type = c('tests'))" \
--default-packages=methods,utils,stats
help:
@echo -e "Usage:\n\
\tmake clean package, create docs, install package and run tests\n\
\tmake clean clean package (remove shared libraries, objects files and documentation)\n\
\tmake doc create documentation with Roxygen\n\
\tmake install install package\n\
\tmake coverage run tests with coverage\n\
\tmake test run all tests"