[Genabel-commits] r730 - in pkg/ProbABEL: . doc
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon May 23 17:25:55 CEST 2011
Author: lckarssen
Date: 2011-05-23 17:25:55 +0200 (Mon, 23 May 2011)
New Revision: 730
Added:
pkg/ProbABEL/doc/Makefile
Modified:
pkg/ProbABEL/Makefile
Log:
Added Makefile for the LaTeX documentation of ProbABEL and use this from the main ProbABEL Makefile.
Modified: pkg/ProbABEL/Makefile
===================================================================
--- pkg/ProbABEL/Makefile 2011-05-21 12:16:39 UTC (rev 729)
+++ pkg/ProbABEL/Makefile 2011-05-23 15:25:55 UTC (rev 730)
@@ -15,7 +15,7 @@
CPP = g++
CFLAGS = -I $(SRCDIR)/include -O2
-all: $(EXECUTABLES)
+all: $(EXECUTABLES) doc
cp $(SRCDIR)/extIDS.pl $(BINDIR)/.
cp $(SRCDIR)/prepare_data.R $(BINDIR)/.
cp $(SRCDIR)/probabel.pl $(BINDIR)/probabel.pl_example
@@ -30,12 +30,15 @@
$(COXREG): $(COXSRC) $(REGFILES)
$(CPP) $(CFLAGS) -DCOXPH $(COXSRC) $(SRCDIR)/main.cpp $(SRCDIR)/fvlib/*.cpp -o $(COXREG)
+doc:
+ $(MAKE) -C $(DOCDIR)/
+
clean: clean_doc
rm -f $(BINDIR)/* $(SRCDIR)/*~ $(SRCDIR)/*.o *.zip *.tar.gz examples/*.out.txt examples/*out
+ $(MAKE) clean -C $(DOCDIR)/
clean_doc:
- rm -f $(DOCDIR)/*~ $(DOCDIR)/*.log $(DOCDIR)/*.idx $(DOCDIR)/*.out $(DOCDIR)/*.toc $(DOCDIR)/*.aux
- rm -rf $(DOCDIR)/auto
+ $(MAKE) clean_doc -C $(DOCDIR)/
linux_distrib: clean
cd .. ; tar -czvf ProbABEL_$(VERSION).tar.gz ProbABEL
@@ -45,4 +48,4 @@
distrib: linux_distrib clean win_distrib clean
-.PHONY: distrib linux_distrib win_distrib clean clean_doc
+.PHONY: distrib linux_distrib win_distrib clean clean_doc doc
Added: pkg/ProbABEL/doc/Makefile
===================================================================
--- pkg/ProbABEL/doc/Makefile (rev 0)
+++ pkg/ProbABEL/doc/Makefile 2011-05-23 15:25:55 UTC (rev 730)
@@ -0,0 +1,45 @@
+MANNAME = ProbABEL_manual
+MANTEXSRC = $(MANNAME).tex
+MANAUX = $(patsubst %.tex, %.aux, $(MANTEXSRC))
+MANPDF = $(patsubst %.tex, %.pdf, $(MANTEXSRC))
+
+.PHONY: clean clean_doc
+
+$(MANPDF): $(MANTEXSRC) $(MANAUX)
+ @echo === Making final PDF ===
+ pdflatex $(MANTEXSRC)
+ @while ( grep "Rerun to " \
+ $(MANNAME).log > /dev/null ); do \
+ echo '** Re-running LaTeX **'; \
+ pdflatex $(MANTEXSRC); \
+ done
+ pdflatex $(MANTEXSRC)
+
+
+# A target needed to keep track of the nr. of LaTeX runs
+.btmp:
+
+
+clean_doc:
+ rm -f *~ *.log *.idx *.out *.toc *.aux
+ rm -rf auto
+
+clean: clean_doc
+ rm -f $(MANPDF)
+ rm -f .btmp
+
+%.aux: %.tex $(MANSRC)
+ @echo === Making $< file ===
+ pdflatex $(MANTEXSRC)
+# Look for citations. Make sure grep never returns an error code.
+ @grep "^\\\\citation" $(MANAUX) > .btmp.new || true
+# If the citations are not changed, don't do anything. Otherwise replace
+# the .btmp file to make sure Bibtex will be run.
+ @if ( diff .btmp.new .btmp > /dev/null ); then \
+ rm .btmp.new; \
+ else \
+ mv .btmp.new .btmp; \
+ fi
+
+# $(DOCS): $()
+# cd $(DOCDIR); pdflatex $(DOCSRC)
More information about the Genabel-commits
mailing list