aboutsummaryrefslogtreecommitdiff
path: root/inst/doc/Makefile
diff options
context:
space:
mode:
authorranke <ranke@5fad18fb-23f0-0310-ab10-e59a3bee62b4>2006-05-24 08:48:24 +0000
committerranke <ranke@5fad18fb-23f0-0310-ab10-e59a3bee62b4>2006-05-24 08:48:24 +0000
commitfb7ea47c774f67b8c26a6844f4ade8935a8653cc (patch)
tree1f1679d4c9225c9c70ce49202e5d0f8233685beb /inst/doc/Makefile
parent3b3d6dfc88c4b8b6475147a3afb5258a5fc82fa5 (diff)
Tested my new Makefile distributed with 0.05-62 of the R vim plugin for Linux/Unix.
git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/chemCal@15 5fad18fb-23f0-0310-ab10-e59a3bee62b4
Diffstat (limited to 'inst/doc/Makefile')
-rw-r--r--inst/doc/Makefile20
1 files changed, 16 insertions, 4 deletions
diff --git a/inst/doc/Makefile b/inst/doc/Makefile
index 26fe678..9c5cd3a 100644
--- a/inst/doc/Makefile
+++ b/inst/doc/Makefile
@@ -1,21 +1,33 @@
# Makefile for Sweave documents containing both Latex and R code
# Author: Johannes Ranke <jranke@uni-bremen.de>
-# Last Change: 2006 Mai 11
+# Last Change: 2006 Mai 24
# based on the Makefile of Nicholas Lewin-Koh
# in turn based on work of Rouben Rostmaian
-# SVN: $Id: Makefile.rnoweb 50 2006-04-18 11:13:52Z ranke $
+# SVN: $Id: Makefile.rnoweb 62 2006-05-24 08:30:59Z ranke $
RNWFILES = $(wildcard *.Rnw)
TARGETS = $(patsubst %.Rnw,%.tex,$(RNWFILE)) $(patsubst %.Rnw,%.pdf,$(RNWFILES))
+RERUN = "(There were undefined references|Rerun to get (cross-references|the bars) right|Table widths have changed. Rerun LaTeX.|Linenumber reference failed)"
+RERUNBIB = "No file.*\.bbl|Citation.*undefined"
+
%.tex: %.Rnw
echo 'Sweave("$<")' | R --no-save --no-restore
%.pdf: %.tex
pdflatex $<
+ egrep -c $(RERUNBIB) $*.log && (bibtex $*;pdflatex $<); true
+ egrep $(RERUN) $*.log && (pdflatex $<) ; true
+ egrep $(RERUN) $*.log && (pdflatex $<) ; true
-all: $(TARGETS)
+all: all-recursive $(TARGETS)
-clean:
+clean: clean-recursive
rm -f *.aux *.log *.bbl *.blg *.brf *.cb *.ind *.idx *.ilg \
*.inx *.ps *.dvi *.toc *.out *.lot *~ *.lof *.ttt *.fff
+
+all-recursive:
+ for dir in $(wildcard *); do if [ -d $$dir ] && [ -f $$dir/Makefile ]; then cd $$dir; $(MAKE) all; cd ..; fi; done
+
+clean-recursive:
+ for dir in $(wildcard *); do if [ -d $$dir ] && [ -f $$dir/Makefile ]; then cd $$dir; $(MAKE) clean; cd ..; fi; done

Contact - Imprint