-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
61 lines (45 loc) · 2.08 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
PACKAGE = scbursts
VERSION = 1.6
all: deps docs build check
update-deps:
Rscript -e 'install.packages("devtools", repos="http://cran.rstudio.com")'
Rscript -e 'install.packages("roxygen2", repos="http://cran.rstudio.com")'
Rscript -e 'install.packages("rmarkdown", repos="http://cran.rstudio.com")'
Rscript -e 'install.packages("knitr", repos="http://cran.rstudio.com")'
Rscript -e 'install.packages("readxl", repos="http://cran.rstudio.com")'
Rscript -e 'install.packages("tibble", repos="http://cran.rstudio.com")'
Rscript -e 'install.packages("tinytex", repos="http://cran.rstudio.com")'
deps:
Rscript -e 'if (!require("devtools")) install.packages("devtools", repos="http://cran.rstudio.com")'
Rscript -e 'if (!require("roxygen2")) install.packages("roxygen2", repos="http://cran.rstudio.com")'
Rscript -e 'if (!require("rmarkdown")) install.packages("rmarkdown", repos="http://cran.rstudio.com")'
Rscript -e 'if (!require("knitr")) install.packages("knitr", repos="http://cran.rstudio.com")'
Rscript -e 'if (!require("readxl")) install.packages("readxl", repos="http://cran.rstudio.com")'
Rscript -e 'if (!require("tibble")) install.packages("tibble", repos="http://cran.rstudio.com")'
Rscript -e 'if (!require("tinytex")) install.packages("tinytex", repos="http://cran.rstudio.com")'
docs:
R -e 'devtools::document()'
build: deps NAMESPACE
R CMD build .
NAMESPACE:
$(MAKE) docs
$(PACKAGE)_$(VERSION).tar.gz:
$(MAKE) build
install: $(PACKAGE)_$(VERSION).tar.gz
R CMD INSTALL $(PACKAGE)_$(VERSION).tar.gz
check: $(PACKAGE)_$(VERSION).tar.gz
R CMD check $(PACKAGE)_$(VERSION).tar.gz --as-cran
fastcheck: build
R CMD check $(PACKAGE)_$(VERSION).tar.gz
clean:
$(RM) -r $(PACKAGE).Rcheck/
$(RM) $(PACKAGE)_$(VERSION).tar.gz
$(PACKAGE).Rcheck:
$(MAKE) check
export: $(PACKAGE)_$(VERSION).tar.gz $(PACKAGE).Rcheck
@echo Copying tarball and manuals to ../build/
@mkdir -p ../build/
@cp scbursts.Rcheck/scbursts-manual.pdf ../build/
@cp scbursts.Rcheck/scbursts/doc/scbursts.pdf ../build/
@cp $(PACKAGE)_$(VERSION).tar.gz ../build
$(MAKE) clean