forked from USCCANA/netdiffuseR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (19 loc) · 808 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
VERSION:=$(shell Rscript -e 'x<-readLines("DESCRIPTION");cat(gsub(".+[:]\\s*", "", x[grepl("^Vers", x)]))')
install: netdiffuseR_$(VERSION).tar.gz
R CMD INSTALL netdiffuseR_$(VERSION).tar.gz
netdiffuseR_$(VERSION).tar.gz: */*.R inst/NEWS README.md
R CMD build .
inst/NEWS: NEWS.md
Rscript -e "rmarkdown::pandoc_convert('NEWS.md', 'plain', output='inst/NEWS')"&& \
head -n 80 inst/NEWS
README.md: README.Rmd
Rscript -e 'rmarkdown::render("README.Rmd")'
.PHONY: check checkv clean
check: netdiffuseR_$(VERSION).tar.gz
R CMD check --as-cran netdiffuseR_$(VERSION).tar.gz
checkv: netdiffuseR_$(VERSION).tar.gz
R CMD check --as-cran --use-valgrind netdiffuseR_$(VERSION).tar.gz
clean:
rm -rf netdiffuseR.Rcheck
man/moran.Rd: R/* src/*.cpp src/*.h
Rscript --vanilla -e 'roxygen2::roxygenize()'