-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
38 lines (28 loc) · 822 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
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGSRC := $(shell basename `pwd`)
all: rd check clean
rd:
Rscript -e 'roxygen2::roxygenise(".")'
readme: rd
Rscript -e 'rmarkdown::render("README.Rmd")'
Rscript -e 'pkgdown::build_site(examples=FALSE)'
Rscript -e 'pkgdown::build_articles()'
readme2: rd
Rscript -e 'rmarkdown::render("README.Rmd", "html_document")'
build: rd
cd ..;\
R CMD build $(PKGSRC)
install: build
cd ..;\
R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz
check:
cd ..;\
# Rscript -e 'rcmdcheck::rcmdcheck("$(PKGNAME)_$(PKGVERS).tar.gz", args="--as-cran")'
Rscript -e 'devtools::check()'
check2: build
cd ..;\
R CMD check $(PKGNAME)_$(PKGVERS).tar.gz
clean:
cd ..;\
$(RM) -r $(PKGNAME).Rcheck/