-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (36 loc) · 958 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGSRC := $(shell basename `pwd`)
build:
cd ..;\
R CMD build $(PKGSRC)
build_fast:
cd ..;\
R CMD build --no-manual --no-build-vignettes $(PKGSRC)
install: build
cd ..;\
R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz
install_fast: build_fast
cd ..;\
R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz
check: build
cd ..;\
R CMD check $(PKGNAME)_$(PKGVERS).tar.gz --as-cran
compile:
Rscript -e "Rcpp::compileAttributes()"
doc:
Rscript -e "devtools::document()"
check_rhub:
Rscript -e \
"rhub::check_for_cran(); \
rhub::check_on_solaris(); \
rhub::check_on_debian(); \
rhub::check_on_macos()"
test:
Rscript -e "devtools::load_all(); tinytest::test_all('.', color = TRUE)"
readme:
Rscript -e "rmarkdown::render('README.Rmd')"; \
rm README.html
clean:
rm -f README.html
cd src/ && rm -f *.o && rm -f *.so