-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
38 lines (25 loc) · 922 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
RSCRIPT= Rscript --vanilla
BUILT_VIGNETTES=vignettes/concepts.Rmd vignettes/frame.Rmd
all: README.md $(BUILT_VIGNETTES)
NEWS: NEWS.md
sed -e 's/^### //g; s/`//g' $< > $@
README.md: README.Rmd
$(RSCRIPT) -e 'devtools::load_all(); knitr::knit("README.Rmd")'
vignettes/%.Rmd: vignettes/%.Rmd.in
$(RSCRIPT) -e 'devtools::load_all(); setwd("vignettes"); knitr::knit(basename("$<"), basename("$@"))'
check:
$(RSCRIPT) -e 'devtools::test(".")'
clean:
$(RSCRIPT) -e 'devtools::clean_dll(".")' && rm -f README.md
cov:
$(RSCRIPT) -e 'covr::package_coverage(line_exclusions = "R/deprecated.R")'
dist: $(BUILT_VIGNETTES) NEWS README.md
mkdir -p dist && cd dist && R CMD build ..
distclean: clean
rm -rf $(BUILT_VIGNETTES)
doc: $(BUILT_VIGNETTES) NEWS README.md
install:
$(RSCRIPT) -e 'devtools::install()'
site:
$(RSCRIPT) -e 'pkgdown::build_site()'
.PHONY: all check clean cov dist distclean doc install site