aboutsummaryrefslogtreecommitdiff
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
parent4ecfa9802a4f0ddfcb2d23bcad2766ce6d2a5fe8 (diff)
Another reorganisation of vignette building by GNUmakefile
-rw-r--r--.Rbuildignore2
-rw-r--r--GNUmakefile49
-rw-r--r--vignettes/GNUMakefile18
3 files changed, 31 insertions, 38 deletions
diff --git a/.Rbuildignore b/.Rbuildignore
index 7633df3f..b4f752d5 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -12,6 +12,8 @@ gmkin_screenshot.png
^vignettes/*.fls$
^vignettes/*.fdb_latexmk$
^vignettes/mkin.tex$
+^vignettes/*.concordance.tex$
+vignettes/*.synctex.gz
^vignettes/FOCUS_Z.tex$
^vignettes/*_cache$
^vignettes/*_files$
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
diff --git a/vignettes/GNUMakefile b/vignettes/GNUMakefile
deleted file mode 100644
index de037089..00000000
--- a/vignettes/GNUMakefile
+++ /dev/null
@@ -1,18 +0,0 @@
-RBIN ?= $(shell dirname "`which R`")
-
-all: vignettes
-
-%.pdf: header.tex references.bib %.Rnw
- "$(RBIN)/Rscript" -e "tools::buildVignette(file = '$*.Rnw')"
-
-%.html: mkin_vignettes.css %.Rmd
- "$(RBIN)/Rscript" -e "tools::buildVignette(file = '$*.Rmd')"
-
-vignettes: mkin.pdf FOCUS_D.html FOCUS_L.html FOCUS_Z.pdf compiled_models.html
-
-clean:
- $(RM) *.aux *.bbl *.blg *.fdb_latexmk *.fls *.log *.out *.toc
- $(RM) *.R *.md
- $(RM) mkin.tex FOCUS_Z.tex
- $(RM) -r *_cache *_files
- $(RM) -r figure cache

Contact - Imprint