-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (38 loc) · 1.04 KB
/
Makefile
File metadata and controls
52 lines (38 loc) · 1.04 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
41
42
43
44
45
46
47
48
49
50
51
## Makefile for generating R packages.
## Based on Rob J Hyndman's Makefile:
## https://github.com/robjhyndman/forecast/blob/master/Makefile
PKG_NAME=$(shell grep -i ^package DESCRIPTION | cut -d : -d \ -f 2)
.PHONY: render_md build_site build install clean docs check check_cran
default: build
check:
Rscript -e "devtools::check()"
check_cran:
R CMD BUILD .
R CMD check --as-cran $(PKG_NAME)_*.tar.gz
rm -f .$(PKG_NAME)_*.tar.gz
render_md:
Rscript -e "rmarkdown::render('README.Rmd', output_format = 'github_document')"
@rm README.html
build_site:
Rscript -e "pkgdown::build_site()"
preview_site:
Rscript -e "pkgdown::preview_site()"
# build:
# Rscript -e "devtools::build()"
build:
R CMD BUILD .
# install:
# R CMD INSTALL .
install: docs build
R CMD INSTALL $(PKG_NAME)_*.tar.gz
@rm $(PKG_NAME)_*.tar.gz
clean:
rm -f ./$(PKG_NAME)_*.tar.gz
rm -rf ./$(PKG_NAME).Rcheck
rm -f *~ R/*~ src/*~
rm -f R/*~ src/*~
rm -f src/*~
docs:
Rscript -e "devtools::document()"
# revdep:
# Rscript -e "revdepcheck::revdep_check(num_workers=3)"