You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.1KB

  1. PACKAGE := $(shell grep '^Package:' DESCRIPTION | sed -E 's/^Package:[[:space:]]+//')
  2. RSCRIPT = Rscript --no-init-file
  3. all: install
  4. test:
  5. ${RSCRIPT} -e 'library(methods); devtools::test()'
  6. roxygen:
  7. @mkdir -p man
  8. ${RSCRIPT} -e "library(methods); devtools::document()"
  9. install:
  10. R CMD INSTALL .
  11. build:
  12. R CMD build .
  13. check:
  14. _R_CHECK_CRAN_INCOMING_=FALSE make check_all
  15. check_all:
  16. ${RSCRIPT} -e "rcmdcheck::rcmdcheck(args = c('--as-cran', '--no-manual'))"
  17. staticdocs:
  18. @mkdir -p inst/staticdocs
  19. ${RSCRIPT} -e "library(methods); staticdocs::build_site()"
  20. rm -f vignettes/*.html
  21. @rmdir inst/staticdocs
  22. website: staticdocs
  23. ./update_web.sh
  24. README.md: README.Rmd
  25. Rscript -e 'library(methods); devtools::load_all(); knitr::knit("README.Rmd")'
  26. sed -i.bak 's/[[:space:]]*$$//' $@
  27. rm -f $@.bak
  28. vignettes/%.Rmd: vignettes/src/%.R
  29. ${RSCRIPT} -e 'library(sowsear); sowsear("$<", output="$@")'
  30. vignettes: vignettes/cyphr.Rmd vignettes/data.Rmd
  31. ${RSCRIPT} -e 'library(methods); devtools::build_vignettes()'
  32. # No real targets!
  33. .PHONY: all test document install vignettes