aboutsummaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2015-06-22 22:09:07 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2015-06-22 22:09:07 +0200
commit72846ba8a3d75eed97901670eafee36b84f359df (patch)
tree4e7206e11918ecf786db8cfebf71090a677a467c /GNUmakefile
parent4ecfa9802a4f0ddfcb2d23bcad2766ce6d2a5fe8 (diff)
Another reorganisation of vignette building by GNUmakefile
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile49
1 files changed, 29 insertions, 20 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 96bbac21..ff39a59f 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -15,23 +15,19 @@ RFSVN ?= $(HOME)/svn/kinfit.r-forge
RFDIR ?= $(RFSVN)/pkg/mkin
SDDIR ?= $(RFSVN)/www/mkin_static
+# Vignettes are listed in the build target
pkgfiles = NEWS \
- data/* \
- DESCRIPTION \
- inst/staticdocs/README \
- man/* \
- NAMESPACE \
- R/* \
- README.md \
- tests/* \
- tests/testthat* \
- vignettes/header.tex \
- vignettes/mkin_vignettes.css* \
- vignettes/*.Rnw \
- vignettes/*.html \
- vignettes/*.Rmd \
- vignettes/*.pdf \
- TODO
+ .Rbuildignore \
+ data/* \
+ DESCRIPTION \
+ inst/staticdocs/README \
+ man/* \
+ NAMESPACE \
+ R/* \
+ README.md \
+ tests/* \
+ tests/testthat* \
+ TODO
all: build
@@ -42,7 +38,7 @@ NEWS: NEWS.md
README.md: README.Rmd
"$(RBIN)/Rscript" -e 'require(knitr); knit("README.Rmd")'
-$(TGZ): $(pkgfiles)
+$(TGZ): $(pkgfiles) vignettes/*.html vignettes/*.pdf
cd ..;\
"$(RBIN)/R" CMD build $(PKGSRC)
@@ -70,15 +66,26 @@ check-no-vignettes: build-no-vignettes
"$(RBIN)/R" CMD check --as-cran --no-tests --no-build-vignettes --no-vignettes $(TGZ)
mv $(TGZ) $(TGZVNR)
-clean: clean-vignettes
+clean:
$(RM) -r $(PKGNAME).Rcheck/
+ $(RM) -r vignettes/*.fls
+ $(RM) -r vignettes/*.fdb_latexmk
+ $(RM) -r vignettes/*_cache
+ $(RM) -r vignettes/*_files
+ $(RM) -r vignettes/*-concordance.tex
+ $(RM) -r vignettes/*.syntex.gz
test: install-no-vignettes
cd tests;\
"$(RBIN)/Rscript" testthat.R
-vignettes: install-no-vignettes vignettes/*
- $(MAKE) -C vignettes
+vignettes/%.pdf: vignettes/header.tex vignettes/references.bib vignettes/%.Rnw
+ "$(RBIN)/Rscript" -e "tools::buildVignette(file = 'vignettes/$*.Rnw', dir = 'vignettes')"
+
+vignettes/%.html: vignettes/mkin_vignettes.css vignettes/%.Rmd
+ "$(RBIN)/Rscript" -e "tools::buildVignette(file = 'vignettes/$*.Rmd', dir = 'vignettes')"
+
+vignettes: install-no-vignettes vignettes/mkin.pdf vignettes/FOCUS_D.html vignettes/FOCUS_L.html vignettes/FOCUS_Z.pdf vignettes/compiled_models.html
sd:
"$(RBIN)/Rscript" -e "library(staticdocs); build_site()"
@@ -91,6 +98,8 @@ r-forge: sd move-sd
git archive master > $(HOME)/mkin.tar;\
cd $(RFDIR) && rm -r `ls` && tar -xf $(HOME)/mkin.tar;\
svn add --force .; svn rm --force `svn status | grep "\!" | cut -d " " -f 8`; cd $(RFSVN) && svn commit -m 'sync with git'
+ git add -A
+ git commit -m 'Vignettes rebuilt by staticdocs::build_site() for static documentation on r-forge'
winbuilder: build
date

Contact - Imprint