forked from JhuangLab/BioInstaller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
76 lines (59 loc) · 1.93 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGSRC := $(shell basename `pwd`)
DOWNLOAD_DIR := "/tmp/test_BioInstaller"
DEST_DIR := "/tmp/test_src"
all: doc build
doc:
Rscript -e "devtools::document()"
build:
cd ..;\
R CMD build $(PKGSRC)
build2:
cd ..;\
R CMD build --no-build-vignettes $(PKGSRC)
install:
cd ..;\
R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz
check: build
cd ..;\
R CMD check $(PKGNAME)_$(PKGVERS).tar.gz
check_cran: build
cd ..;\
R CMD check --as-cran $(PKGNAME)_$(PKGVERS).tar.gz
clean:
cd ..;\
$(RM) -r $(PKGNAME).Rcheck/;\
cleanall:
cd ..;\
$(RM) -r $(PKGNAME).Rcheck/;\
$(RM) -ri $(DOWNLOAD_DIR);\
$(RM) -ri $(DEST_DIR)
show_names:
cd .;\
Rscript -e "cat(BioInstaller::install.bioinfo(show.all.names=T), sep = '\n')"
show_db_names:
cd .;\
Rscript -e "cat(BioInstaller::install.bioinfo(nongithub='./inst/extdata/databases/db_main.toml', \
show.all.names=T), sep = '\n')"
show_meta:
cd .;\
Rscript -e "BioInstaller::get.meta()"
show_versions:
@echo "name:$(name)"
cd .;\
Rscript -e "BioInstaller::install.bioinfo(name='$(name)',show.all.versions = TRUE)";
test:
cd .;\
Rscript -e "devtools::test(reporter = 'summary')"
test2:
@echo "name:$(name), version:$(version)"
cd .;\
Rscript -e "BioInstaller::install.bioinfo(name='$(name)', download.dir=sprintf('$(DOWNLOAD_DIR)/%s/%s', basename(tempdir()), '$(name)'), dest.dir='$(DEST_DIR)', version='$(version)')";
test3:
@echo "name:$(name), version:$(version)"
cd .;\
Rscript -e "BioInstaller::install.bioinfo(name='$(name)', download.dir=sprintf('$(DOWNLOAD_DIR)/%s/%s', basename(tempdir()), '$(name)'), dest.dir='$(DEST_DIR)', version='$(version)', nongithub.cfg = './inst/extdata/config/db/db_main.toml')";
format:
cd .;\
Rscript -e "library(formatR);options('formatR.indent'=2);tidy_dir('./R');tidy_dir('./BioInstaller/inst/extdata/')"