-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
33 lines (23 loc) · 786 Bytes
/
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
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGSRC := $(shell basename `pwd`)
all: install
build:
cd ..;\
R CMD build $(PKGSRC)
install:
cd ..;\
R CMD INSTALL $(PKGSRC)
check: build
cd ..;\
R CMD check $(PKGNAME)_$(PKGVERS).tar.gz --as-cran
make clean
test:
Rscript -e 'library("testthat",quietly=TRUE);library("faoutlier",quietly=TRUE);require("methods",quietly=TRUE);test_dir("tests/testthat")'
paralleltest:
Rscript -e 'library("testthat",quietly=TRUE);library("faoutlier",quietly=TRUE);require("methods",quietly=TRUE);setCluster();test_dir("tests/testthat")'
clean:
$(RM) src/*.o
$(RM) src/*.so
$(RM) ../$(PKGNAME)_$(PKGVERS).tar.gz
$(RM) -r ../$(PKGNAME).Rcheck/