diff --git a/Makefile b/Makefile index aa885fe..e019f7e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ -all: move rmd2md +PACKAGE := $(shell grep '^Package:' DESCRIPTION | sed -E 's/^Package:[[:space:]]+//') +RSCRIPT = Rscript --no-init-file move: cd inst/vign;\ @@ -8,3 +9,24 @@ move: rmd2md: cd vignettes;\ mv rvertnet_vignette.md rvertnet_vignette.Rmd + +all: + ${RSCRIPT} -e 'library(methods); devtools::compile_dll()' + +test: + ${RSCRIPT} -e 'library(methods); devtools::test()' + +doc: + @mkdir -p man + ${RSCRIPT} -e "library(methods); devtools::document()" + +install: + R CMD INSTALL . + +build: + R CMD build . + +check: build + _R_CHECK_CRAN_INCOMING_=FALSE R CMD check --as-cran --no-manual `ls -1tr ${PACKAGE}*gz | tail -n1` + @rm -f `ls -1tr ${PACKAGE}*gz | tail -n1` + @rm -rf ${PACKAGE}.Rcheck