-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
43 lines (29 loc) · 957 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
40
41
# prepare the package for release
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
docs:
Rscript -e 'devtools::document(roclets = c("rd", "collate", "namespace"))'
compile-attributes:
Rscript -e 'Rcpp::compileAttributes()'
build: docs compile-attributes
cd ..;\
R CMD build --no-manual $(PKGSRC) --no-build-vignettes
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()'