-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
59 lines (43 loc) · 1.41 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
51
52
53
54
55
56
57
58
59
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGSRC := $(shell basename `pwd`)
all: rd check1 clean
rd:
Rscript -e 'library(methods);devtools::document()'
readme:
Rscript -e 'rmarkdown::render("README.Rmd", encoding="UTF-8")'
build1:
Rscript -e 'devtools::build()'
build2:
Rscript -e 'devtools::build(vignettes = FALSE)'
install:
cd ..;\
R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz
check1: rd build1
cd ..;\
Rscript -e 'rcmdcheck::rcmdcheck("$(PKGNAME)_$(PKGVERS).tar.gz")'
crancheck: rd build1
cd ..;\
Rscript -e 'rcmdcheck::rcmdcheck("$(PKGNAME)_$(PKGVERS).tar.gz", args="--as-cran")'
bioccheck:
cd ..;\
Rscript -e 'BiocCheck::BiocCheck("$(PKGNAME)_$(PKGVERS).tar.gz")'
debug: rd build1
cd ..;\
R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz
vignettes:
Rscript -e 'usethis::use_vignette("$(PKGNAME)")'
clean:
cd ..;\
$(RM) -r $(PKGNAME).Rcheck/
clean2:
cd ..;\
$(RM) $(PKGNAME)_$(PKGVERS).tar.gz
bignore:
Rscript -e 'usethis::use_build_ignore(glob2rx("inst/extdata/*.png"), escape = FALSE)'
Rscript -e 'usethis::use_build_ignore(c("Makefile", "README.md", "README.Rmd", "CONDUCT.md", ".Rproj.user", ".Rproj"))'
gignore:
Rscript -e 'usethis::use_git_ignore(c(".DS_Store", ".RData", ".Rhistory", ".Rproj.user"))'
biocinit:
git remote add upstream [email protected]:packages/$(PKGNAME).git;\
git fetch --all