-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
29 lines (21 loc) · 639 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
# prepare the package for release
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGSRC := $(shell basename `pwd`)
all: docs install check clean
docs:
R -q -e 'devtools::document()';\
R -q -e 'devtools::clean_dll()';\
build:
cd ..;\
R CMD build --no-build-vignettes $(PKGSRC);\
install: build
cd ..;\
R CMD INSTALL --build $(PKGNAME)_$(PKGVERS).tar.gz;\
check:
cd ..;\
R CMD check --no-build-vignettes --as-cran $(PKGNAME)_$(PKGVERS).tar.gz;\
clean:
cd ..;\
$(RM) -r $(PKGNAME).Rcheck/;\
.PHONY: all docs build install check clean