-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (29 loc) · 1.12 KB
/
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
## ----------------------------------------------------------------------------
## Document/Build/Check/Install R package (depends on devtools and roxygen2)
## Author: Samuel Pawel
## adapted from Manuela Ott, Sebastian Meyer, Florian Gerber
## ----------------------------------------------------------------------------
PACKAGE = ppRep
VERSION = 0.42.4
TAR = $(PACKAGE)_$(VERSION).tar.gz
all: build
description:
sed -i -r -- 's/^Version:.*/Version: '$(VERSION)'/g' DESCRIPTION ;
sed -i -r -- 's/^Date:.*/Date: '`date +'%F'`'/g' DESCRIPTION ;
R -e 'roxygen2::roxygenize()'
document: description
R -e 'devtools::document()'
manual: document
R -e 'devtools::build_manual(path = "out/")'
$(TAR): manual
R -e 'devtools::build(path = "out/")'
build: $(TAR)
install: $(TAR)
R -e 'devtools::install_local(path = "out/$(TAR)")'
check: $(TAR)
R -e 'devtools::check_built(path = "out/$(TAR)", cran = FALSE)'
cran: $(TAR)
R -e 'devtools::check_built(path = "out/$(TAR)", cran = TRUE, remote = TRUE)'
test:
R -e 'tinytest::build_install_test(pkgdir = ".")'
.PHONY: all document manual build install check cran description test