-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMakefile
50 lines (37 loc) · 1.11 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
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
rd:
Rscript -e 'roxygen2::roxygenise(".")'
readme:
Rscript -e 'rmarkdown::render("README.Rmd")'
vignette:
cd vignettes;\
Rscript -e 'rmarkdown::render("scatterpie.Rmd")';\
mv scatterpie.html ../docs/index.html
build:
# cd ..;\
# R CMD build $(PKGSRC)
Rscript -e 'devtools::build()'
install:
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 --as-cran $(PKGNAME)_$(PKGVERS).tar.gz
clean:
cd ..;\
$(RM) -r $(PKGNAME).Rcheck/
windows:
Rscript -e 'rhub::check_on_windows(".")';\
sleep 10;
addtorepo: windows
Rscript -e 'drat:::insert("../$(PKGNAME)_$(PKGVERS).tar.gz", "../drat/docs")';\
Rscript -e 'drat:::insert(ypages::get_windows_binary(), "../drat/docs")';\
cd ../drat;\
git add .; git commit -m '$(PKGNAME)_$(PKGVERS)'; git push -u origin master