-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
31 lines (21 loc) · 1.05 KB
/
makefile
File metadata and controls
31 lines (21 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
RFILE = README
all: help
doc: ## Update package documentation with `roxygen2`
Rscript -e "roxygen2::roxygenise()"; \
knith: $(RFILE).Rmd ## Render README as HTML
echo "rmarkdown::render('$(RFILE).Rmd',output_file='$(RFILE).html')" | R --no-save -q
knitr: $(RFILE).Rmd ## Render README as markdown
echo "rmarkdown::render('$(RFILE).Rmd',output_file='$(RFILE).md')" | R --no-save -q
allcon: ## Run 'allcontributors::add_contributors'
Rscript -e 'allcontributors::add_contributors()'
check: ## Run `rcmdcheck`
Rscript -e 'rcmdcheck::rcmdcheck()'
test: ## Run test suite
Rscript -e 'testthat::test_local()'
pkgcheck: ## Run `pkgcheck` and print results to screen.
Rscript -e 'library(pkgcheck); checks <- pkgcheck(); print(checks); summary (checks)'
clean: ## Clean all junk files, including all pkgdown docs
rm -rf *.html *.png README_cache docs/
help: ## Show this help
@printf "Usage:\033[36m make [target]\033[0m\n"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'