aboutsummaryrefslogtreecommitdiff
path: root/trunk/inst/doc/Makefile
diff options
context:
space:
mode:
authorranke <ranke@5fad18fb-23f0-0310-ab10-e59a3bee62b4>2007-10-01 19:44:04 +0000
committerranke <ranke@5fad18fb-23f0-0310-ab10-e59a3bee62b4>2007-10-01 19:44:04 +0000
commit14a5af60a36071f6a9b4471fdf183fd91e89e1cd (patch)
tree8c845109c3b3e7663b903f3a9d06f7094a4438d8 /trunk/inst/doc/Makefile
parent3dec3886b58f73427409d3ef9427c8440420cbc0 (diff)
Moved everything into the trunk directory, in order to enable branching
git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/chemCal@22 5fad18fb-23f0-0310-ab10-e59a3bee62b4
Diffstat (limited to 'trunk/inst/doc/Makefile')
-rw-r--r--trunk/inst/doc/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/trunk/inst/doc/Makefile b/trunk/inst/doc/Makefile
new file mode 100644
index 0000000..8eca69e
--- /dev/null
+++ b/trunk/inst/doc/Makefile
@@ -0,0 +1,33 @@
+# Makefile for Sweave documents containing both Latex and R code
+# Author: Johannes Ranke <jranke@uni-bremen.de>
+# Last Change: 2006 Jun 23
+# based on the Makefile of Nicholas Lewin-Koh
+# in turn based on work of Rouben Rostmaian
+# 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: all-recursive $(TARGETS)
+
+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