aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: a923636c99f9e20c92fcfc27d3960e11d95fb13a (plain)
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
NAME = $(shell grep 'Package:' DESCRIPTION | cut -d ' ' -f2)
VER = $(shell grep 'Version:' DESCRIPTION | cut -d ' ' -f2)

install:
	R CMD INSTALL .

build:
	cd ..; R CMD build $(NAME)

check:
	make build
	cd ..; R CMD check $(NAME)_$(VER).tar.gz

cran-check:
	make build
	cd ..; R CMD check --as-cran $(NAME)_$(VER).tar.gz

test:
	make install
	Rscript -e "Sys.setenv("AT_HOME" = "TRUE"); tinytest::test_package('jagsUI')"

coverage:
	make install
	Rscript -e 'Sys.setenv("AT_HOME" = "TRUE"); covr::report(file="/tmp/jagsUI-report.html")'
	firefox /tmp/jagsUI-report.html