3997: Improve documentation build system.

* doc/Makefile.am, * doc/ref_guide/Makefile.am, * doc/tutorial/Makefile.am, * doc/white_paper/Makefile.am: Fix invalid rule names, revamp and update .PHONY. --- milena/ChangeLog | 10 ++++ milena/doc/Makefile.am | 95 +++++++++++++++++++++++++---------- milena/doc/ref_guide/Makefile.am | 10 +++- milena/doc/tutorial/Makefile.am | 15 ++++-- milena/doc/white_paper/Makefile.am | 33 ++++++++++++- 5 files changed, 129 insertions(+), 34 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index f39897a..3887983 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,3 +1,13 @@ +2009-06-05 Guillaume Lazzara <guillaume.lazzara@lrde.epita.fr> + + Improve documentation build system. + + * doc/Makefile.am, + * doc/ref_guide/Makefile.am, + * doc/tutorial/Makefile.am, + * doc/white_paper/Makefile.am: Fix invalid rule names, revamp and + update .PHONY. + 2009-06-05 Thierry Geraud <thierry.geraud@lrde.epita.fr> Some fixes. diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am index f1025b3..3e23eab 100644 --- a/milena/doc/Makefile.am +++ b/milena/doc/Makefile.am @@ -2,45 +2,80 @@ include $(top_srcdir)/milena/doc/doc.mk -SUBDIRS = tutorial white_paper +SUBDIRS = \ + tutorial \ + white_paper + DOXYGEN = doxygen -.PHONY: doc user-doc complete-doc html-complete html-user tutorial white-paper regen-dist examples -doc: user-doc tutorial white_paper ref-guide -complete-doc: html-complete +.PHONY: doc-all doc doc-html doc-dev doc-dev-html ref-doc-dev ref-doc-dev-html\ + ref-doc ref-doc-html tutorial tutorial-html white-paper \ + white-paper-html ref-guide ref-guide-html examples fix-refdata \ + fig-convert regen-dist + + +# Doxygen documentation output directory. +user: user-doc-html user-doc + + +doc-all: doc doc-html doc-dev doc-dev-html + + +doc: tutorial white-paper ref-guide ref-doc + +doc-html: tutorial-html white-paper-html ref-guide-html ref-doc-html + +doc-dev: tutorial ref-guide white-paper ref-doc-dev + +doc-dev-html: tutorial-html ref-guide-html white-paper-html ref-doc-dev-html + -user-doc: html-user -html-complete: Doxyfile tuto-html ref-guide-html +ref-doc-dev: Doxyfile examples + $(DOXYGEN) Doxyfile_complete_pdf + +ref-doc-dev-html: Doxyfile examples $(DOXYGEN) Doxyfile_complete -html-user: Doxyfile tuto-html ref-guide-html + +ref-doc: Doxyfile examples + $(DOXYGEN) Doxyfile_user_pdf + +ref-doc-html: Doxyfile examples $(DOXYGEN) Doxyfile_user -tuto-html: examples fig-convert - $(MAKE) -C tutorial tuto-html + tutorial: examples fig-convert - $(MAKE) -C tutorial tutorial + cd tutorial && $(MAKE) $(AM_MAKEFLAGS) $@ + +tutorial-html: examples fig-convert + cd tutorial && $(MAKE) $(AM_MAKEFLAGS) $@ + white-paper: - $(MAKE) -C white_paper white-paper + cd white_paper && $(MAKE) $(AM_MAKEFLAGS) $@ + +white-paper-html: + cd white_paper && $(MAKE) $(AM_MAKEFLAGS) $@ + -ref-guide: - $(MAKE) -C ref_guide ref-guide +ref-guide: examples + cd ref_guide && $(MAKE) $(AM_MAKEFLAGS) $@ -ref-guide-html: - $(MAKE) -C ref_guide ref-guide-html +ref-guide-html: examples + cd ref_guide && $(MAKE) $(AM_MAKEFLAGS) $@ examples: - make -C examples examples + cd examples && $(MAKE) $(AM_MAKEFLAGS) $@ + fix-refdata: - make -C examples fix-refdata + cd examples && $(MAKE) $(AM_MAKEFLAGS) $@ fig-convert: @failcom='exit 1'; \ @@ -58,11 +93,14 @@ edit = sed -e "s|@ID@|$$Id|" \ -e 's,@top_builddir\@,$(top_builddir),g' \ -e 's,@top_srcdir\@,$(top_srcdir),g' +edit_pdf = sed -e 's,GENERATE_LATEX = NO,GENERATE_LATEX = YES,g' \ + -e 's,GENERATE_HTML = YES,GENERATE_HTML = NO,g' + # FIXME: This is not good. We should set these parameters for both # documentation (complete and user) using @VARIABLES@. Don't generate # Doxyfile_user from Doxyfile_complete! Both should be a product # derived from a single source, Doxyfile.in. -edit_user = sed -e 's,OUTPUT_DIRECTORY = ./complete/,OUTPUT_DIRECTORY = ./user/,g' \ +edit_user = sed -e 's,OUTPUT_DIRECTORY = ./complete/,OUTPUT_DIRECTORY = ./user/,g' \ -e 's,EXTRACT_ALL = YES,EXTRACT_ALL = NO,g' \ -e 's,EXTRACT_PRIVATE = YES,EXTRACT_PRIVATE = NO,g' \ -e 's,EXTRACT_STATIC = YES,EXTRACT_STATIC = NO,g' \ @@ -98,12 +136,13 @@ include $(srcdir)/outputs/outputs.mk EXTRA_DIST += \ -Doxyfile.in \ -groups \ -user \ -tools/sample_utils.hh \ -tools/split_sample.sh \ -tools/todoxygen.sh + Doxyfile.in \ + groups \ + user \ + tools/clearbanner.sh \ + tools/sample_utils.hh \ + tools/split_sample.sh \ + tools/todoxygen.sh CLEANFILES = \ Doxyfile_complete \ @@ -114,9 +153,11 @@ Doxyfile_user # Moreover, this file is updated whenever ChangeLog is touched: using # sed instead of configure saves us a lot of time. Doxyfile: $(top_srcdir)/milena/ChangeLog $(srcdir)/Doxyfile.in - Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog`; \ - $(edit) $(srcdir)/Doxyfile.in >Doxyfile_complete && \ - $(edit_user) Doxyfile_complete >Doxyfile_user + Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog`; \ + $(edit) $(srcdir)/Doxyfile.in >Doxyfile_complete && \ + $(edit_pdf) Doxyfile_complete > Doxyfile_complete_pdf && \ + $(edit_user) Doxyfile_complete >Doxyfile_user && \ + $(edit_pdf) Doxyfile_user > Doxyfile_user_pdf clean-local: rm -rf complete user diff --git a/milena/doc/ref_guide/Makefile.am b/milena/doc/ref_guide/Makefile.am index 774d69f..82f0051 100644 --- a/milena/doc/ref_guide/Makefile.am +++ b/milena/doc/ref_guide/Makefile.am @@ -3,15 +3,21 @@ include $(top_srcdir)/milena/doc/doc.mk TEXINPUTS = $(DOC_SRCDIR):$(DOC_BUILDDIR):$(OUTPUTS_SRCDIR):$(IMG_SRCDIR): + ref-guide: TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/ref_guide.tex TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/ref_guide.tex TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/ref_guide.tex + +ref_guide.pdf: ref-guide + + ref-guide-html: chmod u+x $(DOC_SRCDIR)/tools/todoxygen.sh $(DOC_SRCDIR)/tools/todoxygen.sh $(srcdir)/ref_guide.tex $(DOC_BUILDDIR)/ref_guide $(DOC_SRCDIR) + clean-local: rm -f ref_guide.aux ref_guide.toc ref_guide.log ref_guide.bbl ref_guide.out rm -f *~ *blg *.lot @@ -19,6 +25,6 @@ clean-local: rm -f *.haux *.hh *.html *.htoc EXTRA_DIST = \ -ref_guide.tex \ -ref_guide.pdf + ref_guide.tex \ + ref_guide.pdf diff --git a/milena/doc/tutorial/Makefile.am b/milena/doc/tutorial/Makefile.am index ceeae75..eb53a0a 100644 --- a/milena/doc/tutorial/Makefile.am +++ b/milena/doc/tutorial/Makefile.am @@ -1,6 +1,7 @@ -.PHONY: tutorial tuto-html +.PHONY: tutorial tutorial-html include $(top_srcdir)/milena/doc/doc.mk + TEXINPUTS = $(DOC_SRCDIR):$(DOC_BUILDDIR):$(OUTPUTS_SRCDIR):$(IMG_SRCDIR): tutorial: @@ -8,17 +9,23 @@ tutorial: TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/tutorial.tex TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/tutorial.tex -tuto-html: + +tutorial.pdf: tutorial + + +tutorial-html: chmod u+x $(DOC_SRCDIR)/tools/todoxygen.sh $(DOC_SRCDIR)/tools/todoxygen.sh $(srcdir)/tutorial.tex $(DOC_BUILDDIR)/tutorial $(DOC_SRCDIR) + clean-local: rm -f tutorial.aux tutorial.toc tutorial.log tutorial.bbl tutorial.out rm -f *~ *blg *.lot rm -f tutorial.pdf rm -f *.haux *.hh *.html *.htoc + EXTRA_DIST = \ -tutorial.tex \ -tutorial.pdf + tutorial.tex \ + tutorial.pdf diff --git a/milena/doc/white_paper/Makefile.am b/milena/doc/white_paper/Makefile.am index e5d0986..cd44e29 100644 --- a/milena/doc/white_paper/Makefile.am +++ b/milena/doc/white_paper/Makefile.am @@ -1,8 +1,39 @@ include $(top_srcdir)/milena/doc/doc.mk -TEXINPUTS = $(DOC_SRCDIR):$(top_srcdir)/milena/doc/white_paper/figures: +TEXINPUTS = $(DOC_SRCDIR):$(srcdir)/figures: + +PNGS = \ + figures/house.png \ + figures/house_rag.png \ + figures/house_wshed.png \ + figures/house_wshed_mean_colors.png + +.png.eps: + convert $< $@ + +.PHONY: white-paper white-paper-html white-paper: TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/white_paper.tex TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/white_paper.tex TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/white_paper.tex +white-paper.pdf: white-paper + +white-paper-html: $(PNGS:png=eps) + mkdir -p white_paper_html + TEXINPUTS=$(TEXINPUTS) hevea -O -fix -I $(srcdir)/figures $(srcdir)/white_paper.tex -o white_paper_html/index.html + chmod +x $(top_srcdir)/milena/doc/tools/clearbanner.sh + $(top_srcdir)/milena/doc/tools/clearbanner.sh white_paper_html/index.html + +clean-local: + rm -Rf white_paper_html + rm -f *.eps + rm -f white_paper_image.* + rm -f white_paper.pdf + rm -f *.log *.idx *.out *.aux + +EXTRA_DIST = \ + white_paper.tex \ + white_paper.pdf \ + $(PNGS) + -- 1.5.6.5
participants (1)
-
Guillaume Lazzara