-
Notifications
You must be signed in to change notification settings - Fork 3
/
makefile
31 lines (22 loc) · 804 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
VERSION:=$(shell grep Version: DESCRIPTION|sed 's/Version: //')
NAME:=$(shell grep Package: DESCRIPTION|sed 's/Package: //')
PACKAGEFILE:=../$(NAME)_$(VERSION).tar.gz
all: $(PACKAGEFILE) README.md
.PHONY: all install
install:
R -e 'devtools::install_github("ahwbest/dr4pl")'
localInstall:
R -e 'devtools::install()'
man: R/*.R
R -e 'devtools::document()'
touch man
inst/doc: vignettes/*.Rnw R/*.R
R -e 'devtools::build_vignettes()'
touch inst/doc
README.md: README.Rmd R/*.R
make localInstall
R -e 'knitr::opts_chunk$$set(fig.path="README_files/figure-html/");knitr::knit("README.Rmd")'
sed '/^---$$/,/^---$$/d' README.md --in-place
$(PACKAGEFILE): man R/*.R DESCRIPTION inst/doc
sed -i "s/^Date:.*$$/Date: `date +%Y-%m-%d`/" DESCRIPTION
R -e 'devtools::check();devtools::build()'