-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (29 loc) · 1.05 KB
/
Makefile
File metadata and controls
40 lines (29 loc) · 1.05 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
36
37
38
39
40
PKG := $(shell cat DESCRIPTION | awk '$$1 == "Package:" { print $$2 }')
VER := $(shell cat DESCRIPTION | awk '$$1 == "Version:" { print $$2 }')
SRC := $(wildcard src/*.cc)
HDR := $(wildcard src/*.hh)
all: $(PKG)_$(VER).tar.gz
build:
R -e "Rcpp::compileAttributes(verbose=TRUE)"
R -e "usethis::use_roxygen_md(); roxygen2md::roxygen2md(); devtools::document()"
R CMD build . --no-build-vignettes
clean:
rm -f src/*.o src/*.so
rm -f $(PKG)_$(VER).tar.gz
$(PKG)_$(VER).tar.gz: $(SRC) $(HDR) .Rbuildignore
rm -f src/*.so $@
R -e "Rcpp::compileAttributes(verbose=TRUE)"
R -e "usethis::use_roxygen_md(); roxygen2md::roxygen2md(); devtools::document()"
R CMD build . --no-build-vignettes
check: $(PKG)_$(VER).tar.gz
R CMD check $<
install: $(PKG)_$(VER).tar.gz
R -e "install.packages('$<')"
reference:
R -e "pkgdown::build_reference()"
RMD := $(wildcard vignettes/*.Rmd)
DOC := $(foreach x, $(RMD), $(subst vignettes, docs/articles, $(x)))
HTML := $(DOC:.Rmd=.html)
all_articles: $(HTML)
docs/articles/%.html: vignettes/%.Rmd
R -e "pkgdown::build_article('$*')"