-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
39 lines (27 loc) · 893 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
R := R
SOURCEDIR := src
SOURCES := $(shell find $(SOURCEDIR) -name '*.cpp')
.PHONY: all build check clean install uninstall document lintr \
install-devtools install-lintr
all: clean document build check install
build: document
$(R) CMD build .
check: build
$(R) CMD check vtrace*tar.gz
clean:
rm -f vtrace*tar.gz
rm -rf vtrace.Rcheck
rm -rf src/*.o src/*.so
rm -rf man
install: clean
$(R) CMD INSTALL .
uninstall:
$(R) --quiet -e 'remove.packages("vtrace")'
document: install-devtools
$(R) --quiet -e 'devtools::document()'
lintr: install-lintr
$(R) --quiet -e 'quit(status = length(print(lintr::lint_package())) != 0)'
install-devtools:
$(R) --quiet -e 'if (!require("devtools")) install.packages("devtools", repos="https://cloud.r-project.org")'
install-lintr:
$(R) --quiet -e 'if (!require("lintr")) install.packages("lintr", repos="https://cloud.r-project.org")'