-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (27 loc) · 1.01 KB
/
Makefile
File metadata and controls
39 lines (27 loc) · 1.01 KB
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
VERSION:=$(shell Rscript -e 'x<-readLines("DESCRIPTION");cat(gsub(".+[:]\\s*", "", x[grepl("^Vers", x)]))')
PKGNAME:=$(shell Rscript -e 'x<-readLines("DESCRIPTION");cat(gsub(".+[:]\\s*", "", x[grepl("^Package", x)]))')
build:
R CMD build .
install:
$(MAKE) clean && \
R CMD build . && \
R CMD INSTALL $(PKGNAME)_$(VERSION).tar.gz
README.md: README.qmd
quarto render README.qmd
.PHONY: checfull checkv clean
check: $(PKGNAME)_$(VERSION).tar.gz
R CMD check --no-vignettes --no-manual $(PKGNAME)_$(VERSION).tar.gz
checkfull: R/*.R inst/NEWS README.md
R CMD build . \&&
R CMD check --as-cran $(PKGNAME)_$(VERSION).tar.gz
checkv: $(PKGNAME)_$(VERSION).tar.gz
R CMD check --as-cran --use-valgrind $(PKGNAME)_$(VERSION).tar.gz
clean:
rm -rf $(PKGNAME).Rcheck $(PKGNAME)_$(VERSION).tar.gz ; \
Rscript --vanilla -e 'devtools::clean_dll()'
man: R/*
Rscript --vanilla -e 'devtools::document()'
docs: man
docker:
docker run -v$(pwd):/pkg/ -w/pkg --rm -i uscbiostats/fmcmc:latest make check
.PHONY: man docker docs