-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
41 lines (28 loc) · 909 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
37
38
39
DELETE := rm -rf
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGSRC := $(shell basename `pwd`)
all: install
clean:
$(DELETE) src/*.o src/*.so
document:
Rscript -e 'devtools::document(roclets = c("rd", "collate", "namespace"))'
compile-attributes:
Rscript -e 'Rcpp::compileAttributes()'
build: document compile-attributes
cd ..;\
R CMD build --no-manual $(PKGSRC)
build-cran: compile-attributes
cd ..;\
R CMD build $(PKGSRC)
install: compile-attributes
cd ..;\
R CMD INSTALL --no-multiarch --with-keep.source $(PKGNAME)
clean-install: compile-attributes
R CMD INSTALL --preclean --no-multiarch --with-keep.source $(PKGNAME)
check: compile-attributes
Rscript -e 'devtools::check()'
test: compile-attributes
Rscript -e 'devtools::test()'
vignettes:
Rscript -e 'devtools::build_vignettes()'