* doc/Doxyfile.in (OUTPUT_DIRECTORY): Set to ./devel/
(IMAGE_PATH): Add @top_builddir@/milena/doc/figures.
* doc/doc.mk (DOC_SRCDIR, DOC_BUILDDIR): Strip trailing backslash.
* doc/Makefile.am (doc): Depend on..
(doc-user, doc-devel): ...these (new) phony targets.
Use them to factor...
(doc-dev-pdf, doc-dev-html): ...these rules.
Rename as...
(doc-devel-pdf, doc-devel-html): ...these rules.
(ref-doc-dev): Rename as...
(ref-doc-devel-pdf): ...this.
(EXTRA_DEPS, USER_REFMAN_PDF, USER_REFMAN_HTML)
(DEVEL_REFMAN_PDF, DEVEL_REFMAN_HTML):
New variables.
(ref-doc-pdf, ref-doc-pdf, ref-doc-devel-html, ref-doc-devel-pdf):
Turn targets into mere shortcuts for...
($(USER_REFMAN_PDF), $(USER_REFMAN_HTML))
($(DEVEL_REFMAN_PDF), $(DEVEL_REFMAN_HTML)):
...these targets.
(tutorial-pdf, tutorial-html, ref-guide-pdf, ref-guide-html):
Remove spurious dependencies.
($(FIGURES_BUILDDIR)/*.png): Rename target as...
($(srcdir)/figures.stamp): ...this.
Depend on $(FIGURES_SRCDIR)/*.p*m.
(EXTRA_DIST): Add ($(srcdir)/figures.stamp.
(fig-convert): Depend on $(srcdir)/figures.stamp.
(edit_user): s/complete/devel/.
(EXTRA_DIST): s,user/html,$(USER_REFMAN_HTML),
s/user/latex/refman.pdf,$(USER_REFMAN_PDF),.
(Doxyfile): Remove target.
(Doxyfile_user, Doxyfile_user_pdf)
(Doxyfile_devel, Doxyfile_devel_pdf):
New targets.
(CLEANFILES): Remove Doxyfile_complete.
Add Doxyfile_user_pdf, Doxyfile_devel and Doxyfile_devel_pdf,
devel and user.
* doc/examples/Makefile.am (all): Remove this target and merge its
actions with...
(run-examples): ...this target.
Do not depend on all.
* doc/ref_guide/Makefile.am (ref-guide): Do not depend on
$(FIGURES_SRCDIR)/* $(OUTPUTS_SRCDIR)/*.
(REF_GUIDE_HH, REF_GUIDE_PDF): New variables.
(ref-guide-html, ref_guide.pdf): Rename rules as...
($(REF_GUIDE_HH), (REF_GUIDE_PDF)): New variables.
Adjust.
(EXTRA_DIST): Adjust.
Add $(REF_GUIDE_HH).
(clean-local): Replace this target by...
(CLEANFILES): ...this variable.
* doc/tutorial/Makefile.am (tutorial): Do not depend on
$(FIGURES_SRCDIR)/* $(OUTPUTS_SRCDIR)/*.
(TUTORIAL_HH, TUTORIAL_PDF): New variables.
(tutorial-html, tutorial.pdf): Rename rules as...
($(TUTORIAL_HH), (TUTORIAL_PDF)): New variables.
Adjust.
(EXTRA_DIST): Adjust.
Add $(TUTORIAL_HH).
(clean-local): Replace this target by...
(CLEANFILES): ...this variable.
* doc/white_paper/Makefile.am (EPSS): New variable.
(WHITE_PAPER_HH, WHITE_PAPER_PDF): New variables.
(white-paper-html, white_paper.pdf): Rename rules as...
($(WHITE_PAPER_HH), (WHITE_PAPER_PDF)): New variables.
Adjust.
(EXTRA_DIST): Adjust.
Add $(WHITE_PAPER_HH) and $(EPSS).
(clean-local): Replace this target by...
(CLEANFILES): ...this variable.
---
milena/ChangeLog | 78 +++++++++++++++++++
milena/doc/Doxyfile.in | 5 +-
milena/doc/Makefile.am | 145 +++++++++++++++++++++---------------
milena/doc/doc.mk | 4 +-
milena/doc/examples/Makefile.am | 4 +-
milena/doc/ref_guide/Makefile.am | 45 +++++++----
milena/doc/tutorial/Makefile.am | 50 ++++++++-----
milena/doc/white_paper/Makefile.am | 31 +++++---
8 files changed, 245 insertions(+), 117 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 846caf9..02b81b8 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,83 @@
2009-06-11 Roland Levillain <roland(a)lrde.epita.fr>
+ First step toward the overhauling of the documentation generation.
+
+ * doc/Doxyfile.in (OUTPUT_DIRECTORY): Set to ./devel/
+ (IMAGE_PATH): Add @top_builddir@/milena/doc/figures.
+ * doc/doc.mk (DOC_SRCDIR, DOC_BUILDDIR): Strip trailing backslash.
+ * doc/Makefile.am (doc): Depend on..
+ (doc-user, doc-devel): ...these (new) phony targets.
+ Use them to factor...
+ (doc-dev-pdf, doc-dev-html): ...these rules.
+ Rename as...
+ (doc-devel-pdf, doc-devel-html): ...these rules.
+ (ref-doc-dev): Rename as...
+ (ref-doc-devel-pdf): ...this.
+ (EXTRA_DEPS, USER_REFMAN_PDF, USER_REFMAN_HTML)
+ (DEVEL_REFMAN_PDF, DEVEL_REFMAN_HTML):
+ New variables.
+ (ref-doc-pdf, ref-doc-pdf, ref-doc-devel-html, ref-doc-devel-pdf):
+ Turn targets into mere shortcuts for...
+ ($(USER_REFMAN_PDF), $(USER_REFMAN_HTML))
+ ($(DEVEL_REFMAN_PDF), $(DEVEL_REFMAN_HTML)):
+ ...these targets.
+ (tutorial-pdf, tutorial-html, ref-guide-pdf, ref-guide-html):
+ Remove spurious dependencies.
+ ($(FIGURES_BUILDDIR)/*.png): Rename target as...
+ ($(srcdir)/figures.stamp): ...this.
+ Depend on $(FIGURES_SRCDIR)/*.p*m.
+ (EXTRA_DIST): Add ($(srcdir)/figures.stamp.
+ (fig-convert): Depend on $(srcdir)/figures.stamp.
+ (edit_user): s/complete/devel/.
+ (EXTRA_DIST): s,user/html,$(USER_REFMAN_HTML),
+ s/user/latex/refman.pdf,$(USER_REFMAN_PDF),.
+ (Doxyfile): Remove target.
+ (Doxyfile_user, Doxyfile_user_pdf)
+ (Doxyfile_devel, Doxyfile_devel_pdf):
+ New targets.
+ (CLEANFILES): Remove Doxyfile_complete.
+ Add Doxyfile_user_pdf, Doxyfile_devel and Doxyfile_devel_pdf,
+ devel and user.
+
+ * doc/examples/Makefile.am (all): Remove this target and merge its
+ actions with...
+ (run-examples): ...this target.
+ Do not depend on all.
+
+ * doc/ref_guide/Makefile.am (ref-guide): Do not depend on
+ $(FIGURES_SRCDIR)/* $(OUTPUTS_SRCDIR)/*.
+ (REF_GUIDE_HH, REF_GUIDE_PDF): New variables.
+ (ref-guide-html, ref_guide.pdf): Rename rules as...
+ ($(REF_GUIDE_HH), (REF_GUIDE_PDF)): New variables.
+ Adjust.
+ (EXTRA_DIST): Adjust.
+ Add $(REF_GUIDE_HH).
+ (clean-local): Replace this target by...
+ (CLEANFILES): ...this variable.
+
+ * doc/tutorial/Makefile.am (tutorial): Do not depend on
+ $(FIGURES_SRCDIR)/* $(OUTPUTS_SRCDIR)/*.
+ (TUTORIAL_HH, TUTORIAL_PDF): New variables.
+ (tutorial-html, tutorial.pdf): Rename rules as...
+ ($(TUTORIAL_HH), (TUTORIAL_PDF)): New variables.
+ Adjust.
+ (EXTRA_DIST): Adjust.
+ Add $(TUTORIAL_HH).
+ (clean-local): Replace this target by...
+ (CLEANFILES): ...this variable.
+
+ * doc/white_paper/Makefile.am (EPSS): New variable.
+ (WHITE_PAPER_HH, WHITE_PAPER_PDF): New variables.
+ (white-paper-html, white_paper.pdf): Rename rules as...
+ ($(WHITE_PAPER_HH), (WHITE_PAPER_PDF)): New variables.
+ Adjust.
+ (EXTRA_DIST): Adjust.
+ Add $(WHITE_PAPER_HH) and $(EPSS).
+ (clean-local): Replace this target by...
+ (CLEANFILES): ...this variable.
+
+2009-06-11 Roland Levillain <roland(a)lrde.epita.fr>
+
Regen some reference images of the documentation (on Debian GNU/Linux).
* doc/figures/fill-subdomain-2.ppm,,
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index 4bde82f..32f8e42 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
PROJECT_NAME = "Milena (@PACKAGE_NAME@)"
PROJECT_NUMBER = "@PACKAGE_VERSION@ @ID@"
-OUTPUT_DIRECTORY = ./complete/
+OUTPUT_DIRECTORY = ./devel/
CREATE_SUBDIRS = YES
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
@@ -97,7 +97,8 @@ EXAMPLE_PATH = @top_srcdir@/milena/doc/examples \
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH = @top_srcdir@/milena/doc/img \
- @top_srcdir@/milena/doc/figures
+ @top_srcdir@/milena/doc/figures \
+ @top_builddir@/milena/doc/figures
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index ec89037..2f256f9 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -31,70 +31,79 @@ DOXYGEN = doxygen
-.PHONY: doc doc-pdf doc-html doc-dev-pdf doc-dev-html ref-doc-dev-pdf \
- ref-doc-dev-html ref-doc-pdf ref-doc-html tutorial-pdf tutorial-html \
- white-paper-pdf white-paper-html ref-guide-pdf ref-guide-html examples \
- data-regen fix-convert
+.PHONY: doc \
+ doc-user doc-devel \
+ doc-pdf doc-html doc-devel-pdf doc-devel-html \
+ ref-doc-pdf ref-doc-html \
+ ref-doc-devel-pdf ref-doc-devel-html \
+ tutorial-pdf tutorial-html \
+ white-paper-pdf white-paper-html \
+ ref-guide-pdf ref-guide-html \
+ examples data-regen fig-convert
+doc: doc-user doc-devel
-# Doxygen documentation output directory.
-user/html: ref-doc-html
-
-user/latex/refman.pdf: ref-doc
-
-
-doc: doc-pdf doc-html doc-dev-pdf doc-dev-html
-
+doc-user: doc-pdf doc-html
+doc-devel: doc-devel-pdf doc-devel-html
doc-pdf: tutorial-pdf white-paper-pdf ref-guide-pdf ref-doc-pdf
doc-html: tutorial-html white-paper-html ref-guide-html ref-doc-html
-doc-dev-pdf: tutorial-pdf ref-guide-pdf white-paper-pdf ref-doc-dev-pdf
-
-doc-dev-html: tutorial-html ref-guide-html white-paper-html ref-doc-dev-html
-
+doc-devel-pdf: tutorial-pdf ref-guide-pdf white-paper-pdf ref-doc-devel-pdf
+doc-devel-html: tutorial-html ref-guide-html white-paper-html ref-doc-devel-html
-ref-doc-dev: Doxyfile fig-convert
- $(DOXYGEN) Doxyfile_complete_pdf
- cd complete/latex && make $(AM_MAKEFLAGS)
+# Shared dependencies on the products of tutorial/ and ref_guide/.
+EXTRA_DEPS = tutorial/tutorial.hh ref_guide/ref_guide.hh
-ref-doc-dev-html: Doxyfil fig-converte
- $(DOXYGEN) Doxyfile_complete
-
-
-ref-doc-pdf: Doxyfile fig-convert
+# Doxygen PDF documentation outputs.
+USER_REFMAN_PDF = user/latex/refman.pdf
+ref-doc-pdf: $(USER_REFMAN_PDF)
+$(USER_REFMAN_PDF): Doxyfile_user_pdf $(FIGURES_BUILDDIR) $(EXTRA_DEPS)
$(DOXYGEN) Doxyfile_user_pdf
- cd user/latex && make ref-doc
+ cd user/latex && make pdf
-ref-doc-html: Doxyfile fig-convert
+USER_REFMAN_HTML = user/html
+ref-doc-html: $(USER_REFMAN_HTML)
+$(USER_REFMAN_HTML): Doxyfile_user $(FIGURES_BUILDDIR) $(EXTRA_DEPS)
$(DOXYGEN) Doxyfile_user
+# Doxygen HTML documentation output directories.
+DEVEL_REFMAN_PDF = devel/latex/refman.pdf
+ref-doc-devel-pdf: $(DEVEL_REFMAN_PDF)
+$(DEVEL_REFMAN_PDF): Doxyfile_devel_pdf $(FIGURES_BUILDDIR) $(EXTRA_DEPS)
+ $(DOXYGEN) Doxyfile_devel_pdf
+ cd devel/latex && make $(AM_MAKEFLAGS)
+DEVEL_REFMAN_HTML = devel/html
+ref-doc-devel-html: $(DEVEL_REFMAN_HTML)
+$(DEVEL_REFMAN_HTML): Doxyfile_devel $(FIGURES_BUILDDIR) $(EXTRA_DEPS)
+ $(DOXYGEN) Doxyfile_devel
-tutorial-pdf: fig-convert
+# Tutorial.
+tutorial-pdf:
cd tutorial && $(MAKE) $(AM_MAKEFLAGS) $@
-
-tutorial-html: fig-convert
+tutorial-html:
cd tutorial && $(MAKE) $(AM_MAKEFLAGS) $@
-
+# White Paper.
white-paper-pdf:
cd white_paper && $(MAKE) $(AM_MAKEFLAGS) $@
white-paper-html:
cd white_paper && $(MAKE) $(AM_MAKEFLAGS) $@
-
-ref-guide-pdf: fig-convert
+# Reference Guide.
+ref-guide-pdf:
cd ref_guide && $(MAKE) $(AM_MAKEFLAGS) $@
-ref-guide-html: fig-convert
+ref-guide-html:
cd ref_guide && $(MAKE) $(AM_MAKEFLAGS) $@
+# FIXME: Adresse the construction of examples (see examples/Makefile.am).
data-regen:
cd examples && $(MAKE) $(AM_MAKEFLAGS) $@
@@ -103,18 +112,23 @@ fix-refdata:
cd examples && $(MAKE) $(AM_MAKEFLAGS) $@
-fig-convert: $(FIGURES_BUILDDIR)/*.png
+fig-convert: $(srcdir)/figures.stamp
-$(FIGURES_BUILDDIR)/*.png:
- test -d $(FIGURES_BUILDDIR) || mkdir $(FIGURES_BUILDDIR) \
- @failcom='exit 1'; \
- list="$(FIGURES_SRCDIR)/*.p*m"; for img in $$list; do \
- echo "Converting $$img to png"; \
- name=`basename $$img` \
- ext=`echo $$name | cut -d '.' -f 2`; \
- convert -scale 250 $$img $(FIGURES_BUILDDIR)/`basename $$img $$ext`png\
- || eval $$failcom; \
- done;
+EXTRA_DIST = $(srcdir)/figures.stamp
+$(srcdir)/figures.stamp: $(FIGURES_SRCDIR)/*.p*m
+ rm -f $@.tmp
+ touch $@.tmp
+ test -d $(FIGURES_BUILDDIR) || mkdir $(FIGURES_BUILDDIR) && \
+ failcom='exit 1'; \
+ list="$(FIGURES_SRCDIR)/*.p*m"; for img in $$list; do \
+ echo "Converting $$img to PNG"; \
+ name=`basename $$img` \
+ ext=`echo $$name | cut -d '.' -f 2`; \
+ convert -scale 250 $$img \
+ $(FIGURES_BUILDDIR)/`basename $$img $$ext`png \
+ || eval $$failcom; \
+ done
+ mv -f $@.tmp $@
edit = sed -e "s|@ID@|$$Id|" \
@@ -127,10 +141,10 @@ 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
+# documentation (devel and user) using @VARIABLES@. Don't generate
+# Doxyfile_user from Doxyfile_devel! 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 = ./devel/,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' \
@@ -146,7 +160,7 @@ edit_user = sed -e 's,OUTPUT_DIRECTORY =
./complete/,OUTPUT_DIRECTORY
# Regen files.
-EXTRA_DIST = generate_dist_files.sh headers.stamp
+EXTRA_DIST += generate_dist_files.sh headers.stamp
include $(top_srcdir)/build-aux/regen-recursive.mk
regen-am:
@rm -f $(srcdir)/headers.stamp.tmp
@@ -174,28 +188,37 @@ include $(srcdir)/outputs/outputs.mk
EXTRA_DIST += \
Doxyfile.in \
groups \
- user/html \
- user/latex/refman.pdf \
+ $(USER_REFMAN_HTML) \
+ $(USER_REFMAN_PDF) \
tools/clearbanner.sh \
tools/sample_utils.hh \
tools/split_sample.sh \
tools/todoxygen.sh
-CLEANFILES = \
-Doxyfile_complete \
-Doxyfile_user
+CLEANFILES = \
+ Doxyfile_user \
+ Doxyfile_user_pdf \
+ Doxyfile_devel \
+ Doxyfile_devel_pdf \
+ devel \
+ user
# Sed is used to generate Doxyfile from Doxyfile.in instead of
# configure, because the former is way faster than the latter.
# 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_pdf) Doxyfile_complete > Doxyfile_complete_pdf && \
- $(edit_user) Doxyfile_complete >Doxyfile_user && \
- $(edit_pdf) Doxyfile_user > Doxyfile_user_pdf
+Doxyfile_user: Doxyfile_devel $(top_srcdir)/milena/ChangeLog
+ Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog`; \
+ $(edit) $< >$@
+
+Doxyfile_user_pdf: Doxyfile_user $(top_srcdir)/milena/ChangeLog
+ Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog`; \
+ $(edit_pdf) $< >$@
-clean-local:
- rm -rf complete user
+Doxyfile_devel: $(srcdir)/Doxyfile.in $(top_srcdir)/milena/ChangeLog
+ Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog`; \
+ $(edit) $< >$@
+Doxyfile_devel_pdf: $Doxyfile_devel $(top_srcdir)/milena/ChangeLog
+ Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog`; \
+ $(edit_pdf) $< >$@
diff --git a/milena/doc/doc.mk b/milena/doc/doc.mk
index 7fc7584..822717e 100644
--- a/milena/doc/doc.mk
+++ b/milena/doc/doc.mk
@@ -5,7 +5,7 @@ include $(top_srcdir)/milena/tests/tests.mk
AM_CPPFLAGS += -I$(top_srcdir)/milena/doc/tutorial/tools
-DOC_SRCDIR = $(top_srcdir)/milena/doc/
+DOC_SRCDIR = $(top_srcdir)/milena/doc
OUTPUTS_SRCDIR = $(DOC_SRCDIR)/outputs
SPLIT_OUTPUTS_SRCDIR = $(OUTPUTS_SRCDIR)/split
FIGURES_SRCDIR = $(DOC_SRCDIR)/figures
@@ -13,7 +13,7 @@ EXAMPLES_SRCDIR = $(DOC_SRCDIR)/examples
SPLIT_EXAMPLES_SRCDIR = $(EXAMPLES_SRCDIR)/split
IMG_SRCDIR = $(DOC_SRCDIR)/img
-DOC_BUILDDIR = $(top_builddir)/milena/doc/
+DOC_BUILDDIR = $(top_builddir)/milena/doc
OUTPUTS_BUILDDIR = $(DOC_BUILDDIR)/outputs
SPLIT_OUTPUTS_BUILDDIR = $(OUTPUTS_BUILDDIR)/split
FIGURES_BUILDDIR = $(DOC_BUILDDIR)/figures
diff --git a/milena/doc/examples/Makefile.am b/milena/doc/examples/Makefile.am
index 497be61..66468bd 100644
--- a/milena/doc/examples/Makefile.am
+++ b/milena/doc/examples/Makefile.am
@@ -138,11 +138,9 @@ tuto4_point2d_SOURCES = tuto4/point2d.cc
split-outputs
-all:
+run-examples:
mkdir -p $(OUTPUTS_BUILDDIR)
mkdir -p $(FIGURES_BUILDDIR)
-
-run-examples: all
@failcom='exit 1'; \
list='$(noinst_PROGRAMS)'; for bin in $$list; do \
echo "Running $$bin"; \
diff --git a/milena/doc/ref_guide/Makefile.am b/milena/doc/ref_guide/Makefile.am
index d77d1b2..e77300a 100644
--- a/milena/doc/ref_guide/Makefile.am
+++ b/milena/doc/ref_guide/Makefile.am
@@ -18,34 +18,47 @@
.PHONY: ref-guide ref-guide-html
include $(top_srcdir)/milena/doc/doc.mk
+
TEXINPUTS ="$(DOC_SRCDIR):$(DOC_BUILDDIR):$(OUTPUTS_SRCDIR):\
$(SPLIT_OUTPUTS_SRCDIR):$(IMG_SRCDIR):$(SPLIT_EXAMPLES_SRCDIR):"
-ref-guide: $(FIGURES_SRCDIR)/* $(OUTPUTS_SRCDIR)/* ref-guide-pdf ref-guide-html
+ref-guide: ref-guide-html ref-guide-pdf
-ref-guide-pdf: ref_guide.pdf
+# Intermediate product for the various doc targets of the parent
+# directory.
+#
+# This is not a bug: REF_GUIDE_HH is meant to have a `.hh'
+# extension, since it is later parsed by Doxygen, which complains
+# about `.html' files.
+REF_GUIDE_HH = ref_guide.hh
+ref-guide-html: $(REF_GUIDE_HH)
+# FIXME: Missing dependencies on images from $(FIGURES_BUILDDIR).
+$(REF_GUIDE_HH):
+ $(DOC_SRCDIR)/tools/todoxygen.sh $(srcdir)/ref_guide.tex $(DOC_BUILDDIR)/ref_guide
$(DOC_SRCDIR)
-ref_guide.pdf:
+# Final product.
+REF_GUIDE_PDF = ref_guide.pdf
+ref-guide-pdf: $(REF_GUIDE_PDF)
+# FIXME: Missing dependencies on images from $(FIGURES_BUILDDIR).
+$(REF_GUIDE_PDF):
TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/ref_guide.tex
TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/ref_guide.tex
TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/ref_guide.tex
-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
- rm -f ref_guide.pdf
- rm -f *.haux *.hh *.html *.htoc
+CLEANFILES = \
+ ref_guide.aux ref_guide.toc ref_guide.log ref_guide.bbl ref_guide.out \
+ *~ *blg *.lot \
+ $(REF_GUIDE_PDF) \
+ *.haux *.hh *.html *.htoc \
+ ref_guide.html \
+ $(REF_GUIDE_HH)
-EXTRA_DIST = \
- ref_guide.tex \
- ref_guide.pdf
+EXTRA_DIST = \
+ ref_guide.tex \
+ $(REF_GUIDE_HH) \
+ $(REF_GUIDE_PDF)
diff --git a/milena/doc/tutorial/Makefile.am b/milena/doc/tutorial/Makefile.am
index eac50e9..8c81afe 100644
--- a/milena/doc/tutorial/Makefile.am
+++ b/milena/doc/tutorial/Makefile.am
@@ -1,3 +1,4 @@
+
# Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE).
#
# This file is part of Olena.
@@ -22,31 +23,40 @@ include $(top_srcdir)/milena/doc/doc.mk
TEXINPUTS = $(DOC_SRCDIR):$(DOC_BUILDDIR):$(OUTPUTS_SRCDIR):$(IMG_SRCDIR):
-tutorial: $(FIGURES_SRCDIR)/* $(OUTPUTS_SRCDIR)/* tutorial-html tutorial-pdf
-
+tutorial: tutorial-html tutorial-pdf
-tutorial-pdf: tutorial.pdf
-
-tutorial-html:
- chmod u+x $(DOC_SRCDIR)/tools/todoxygen.sh
+# Intermediate product for the various doc targets of the parent
+# directory.
+#
+# This is not a bug: TUTORIAL_HH is meant to have a `.hh' extension,
+# since it is later parsed by Doxygen, which complains about `.html'
+# files.
+TUTORIAL_HH = tutorial.hh
+tutorial-html: $(TUTORIAL_HH)
+# FIXME: Missing dependencies on images from $(FIGURES_BUILDDIR).
+$(TUTORIAL_HH):
$(DOC_SRCDIR)/tools/todoxygen.sh $(srcdir)/tutorial.tex $(DOC_BUILDDIR)/tutorial
$(DOC_SRCDIR)
-tutorial.pdf:
+# Final product.
+TUTORIAL_PDF = tutorial.pdf
+tutorial-pdf: $(TUTORIAL_PDF)
+# FIXME: Missing dependencies on images from $(FIGURES_BUILDDIR).
+$(TUTORIAL_PDF): $(FIGURES_BUILDDIR)
TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/tutorial.tex
TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/tutorial.tex
TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/tutorial.tex
-
-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
- rm -f tutorial.haux tutorial.hh tutorial.html
-
-
-EXTRA_DIST = \
- tutorial.tex \
- tutorial.pdf
-
+CLEANFILES = \
+ tutorial.aux tutorial.toc tutorial.log tutorial.bbl tutorial.out \
+ *~ *blg *.lot \
+ $(TUTORIAL_PDF) \
+ *.haux *.hh *.html *.htoc \
+ tutorial.haux \
+ tutorial.html \
+ $(TUTORIAL_HH)
+
+EXTRA_DIST = \
+ tutorial.tex \
+ $(TUTORIAL_HH) \
+ $(TUTORIAL_PDF)
diff --git a/milena/doc/white_paper/Makefile.am b/milena/doc/white_paper/Makefile.am
index 2dcf5bd..ab542a8 100644
--- a/milena/doc/white_paper/Makefile.am
+++ b/milena/doc/white_paper/Makefile.am
@@ -16,6 +16,7 @@
#
include $(top_srcdir)/milena/doc/doc.mk
+
TEXINPUTS=$(DOC_SRCDIR):$(srcdir):
PNGS = \
@@ -24,7 +25,9 @@ PNGS = \
figures/house_wshed.png \
figures/house_wshed_mean_colors.png
-#FIXME: we want to check if 'figures' exists only once!
+EPSS = $(PNGS:png=eps)
+
+# FIXME: we want to check if 'figures' exists only once!
.png.eps:
test -d figures || mkdir figures
convert $< $@
@@ -35,16 +38,17 @@ PNGS = \
white-paper: white-paper-pdf white-paper-html
-white-paper-pdf: white_paper.pdf
-
-white-paper-html: $(PNGS:png=eps)
+WHITE_PAPER_HTML = white_paper_html/index.html
+white-paper-html: $(WHITE_PAPER_HTML)
+$(WHITE_PAPER_HTML): $(srcdir)/white_paper.tex $(EPSS)
test -d white_paper_html || mkdir white_paper_html
- TEXINPUTS=$(TEXINPUTS) hevea -O -fix $(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
+ TEXINPUTS=$(TEXINPUTS) hevea -O -fix $< -o $@
+ $(top_srcdir)/milena/doc/tools/clearbanner.sh $@
-white_paper.pdf:
+WHITE_PAPER_PDF = white_paper.pdf
+white-paper-pdf: $(WHITE_PAPER_PDF)
+$(WHITE_PAPER_PDF):
TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/white_paper.tex
TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/white_paper.tex
TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/white_paper.tex
@@ -56,8 +60,9 @@ clean-local:
rm -f *.log *.idx *.out *.aux
rm -Rf figures
-EXTRA_DIST = \
- white_paper.tex \
- white_paper.pdf \
- $(PNGS)
-
+EXTRA_DIST = \
+ white_paper.tex \
+ $(WHITE_PAPER_HTML) \
+ $(WHITE_PAPER_PDF) \
+ $(PNGS) \
+ $(EPSS)
--
1.6.2.4