-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 1.02 KB
/
Makefile
File metadata and controls
35 lines (26 loc) · 1.02 KB
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
# prepare the package for release
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGSRC := $(shell basename `pwd`)
.PHONY: all docs build build-cran install check travis clean
docs:
R --vanilla --silent -e 'Rcpp::compileAttributes()'
R --vanilla --silent -e 'roxygen2::roxygenise(roclets=c("rd"))'
site: docs
R --vanilla --silent -e 'pkgdown::build_site_github_pages(new_process = FALSE, install = TRUE)'
build:
(cd .. && R CMD build --no-manual $(PKGSRC))
build-cran:
(cd .. && R CMD build $(PKGSRC))
install: build
(cd .. && R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz)
check: build-cran
(cd .. && R CMD check $(PKGNAME)_$(PKGVERS).tar.gz --as-cran)
travis: build
(cd .. && R CMD check $(PKGNAME)_$(PKGVERS).tar.gz --no-manual)
clean:
rm -rf _install _builds CLONES
rm src/RcppExports.cpp src/*.o src/*.so R/RcppExports.R
rm -rf man/*.Rd .roxygen.lock src/.roxygen.lock
rm -rf docs pkgdown
(cd .. && rm -rf $(PKGNAME).Rcheck)