Olena-patches
Threads by month
- ----- 2025 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 9625 discussions
last-svn-commit-28-g2e5cd09 Generate the HTML and LaTeX Doxygen documentation in a single pass.
by Roland Levillain 01 Apr '10
by Roland Levillain 01 Apr '10
01 Apr '10
* doc/Doxyfile.in (GENERATE_LATEX): Enable.
(EXCLUDE): Adjust.
* doc/Makefile.am (ref-doc-html, ref-doc-devel-html):
Remove (phony) targets.
(ref-doc, ref-doc-devel):
New (phony) targets.
(doc-html, doc-devel-html):
Adjust targets.
(DOXYFILE_USER_PDF, DOXYFILE_USER_HTML)
(DOXYFILE_DEVEL_PDF, DOXYFILE_DEVEL_HTML):
Remove variables.
(DOXYFILE_USER_PDF, DOXYFILE_DEVEL):
New variables.
(USER_REFMAN_LATEX, USER_REFMAN_HTML)
(DEVEL_REFMAN_LATEX, DEVEL_REFMAN_HTML):
Remove variables.
(USER_REFMAN): New variable.
(all-local): Adjust.
($(srcdir)/user-refman-latex.stamp)
($(srcdir)/$(USER_REFMAN_LATEX))
($(srcdir)/user-refman-html.stamp)
($(srcdir)/$(USER_REFMAN_HTML))
($(srcdir)/devel-refman-latex.stamp)
($(srcdir)/$(DEVEL_REFMAN_LATEX))
($(srcdir)/devel-refman-html.stamp)
($(srcdir)/$(DEVEL_REFMAN_HTML)):
Remove targets.
($(srcdir)/user-refman.stamp)
($(srcdir)/$(USER_REFMAN))
($(srcdir)/devel-refman.stamp)
($(srcdir)/$(DEVEL_REFMAN)):
New targets.
($(srcdir)/$(USER_REFMAN_PDF), $(srcdir)/$(DEVEL_REFMAN_PDF)):
Adjust targets.
(regen-doc, regen-devel-doc): New (phony) targets.
(clean-user-refman-latex, clean-user-refman-html)
(clean-devel-refman-latex, clean-devel-refman-html):
Remove (phony) targets.
(maintainer-clean-local): Adjust.
(edit_pdf): Remove variable.
(EXTRA_DIST): Remove $(USER_REFMAN_HTML).
Add $(USER_REFMAN)/html.
(install-data-local, uninstall-local): Adjust.
(CLEANFILES): Remove Doxyfile_user, Doxyfile_user_pdf,
Doxyfile_devel, Doxyfile_devel_pdf, devel and user.
(MAINTAINERCLEANFILES): Add Doxyfile_user and Doxyfile_devel.
($(DOXYFILE_USER_PDF), $(DOXYFILE_USER_HTML))
($(DOXYFILE_DEVEL_PDF), $(DOXYFILE_DEVEL_HTML)):
Remove targets.
($(DOXYFILE_USER), $(DOXYFILE_DEVEL)):
New targets.
---
milena/ChangeLog | 56 +++++++++
milena/doc/.gitignore | 8 +-
milena/doc/Doxyfile.in | 8 +-
milena/doc/Makefile.am | 322 +++++++++++++++++-------------------------------
4 files changed, 176 insertions(+), 218 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index b32170e..00c949c 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,61 @@
2010-03-08 Roland Levillain <roland(a)lrde.epita.fr>
+ Generate the HTML and LaTeX Doxygen documentation in a single pass.
+
+ * doc/Doxyfile.in (GENERATE_LATEX): Enable.
+ (EXCLUDE): Adjust.
+ * doc/Makefile.am (ref-doc-html, ref-doc-devel-html):
+ Remove (phony) targets.
+ (ref-doc, ref-doc-devel):
+ New (phony) targets.
+ (doc-html, doc-devel-html):
+ Adjust targets.
+ (DOXYFILE_USER_PDF, DOXYFILE_USER_HTML)
+ (DOXYFILE_DEVEL_PDF, DOXYFILE_DEVEL_HTML):
+ Remove variables.
+ (DOXYFILE_USER_PDF, DOXYFILE_DEVEL):
+ New variables.
+ (USER_REFMAN_LATEX, USER_REFMAN_HTML)
+ (DEVEL_REFMAN_LATEX, DEVEL_REFMAN_HTML):
+ Remove variables.
+ (USER_REFMAN): New variable.
+ (all-local): Adjust.
+ ($(srcdir)/user-refman-latex.stamp)
+ ($(srcdir)/$(USER_REFMAN_LATEX))
+ ($(srcdir)/user-refman-html.stamp)
+ ($(srcdir)/$(USER_REFMAN_HTML))
+ ($(srcdir)/devel-refman-latex.stamp)
+ ($(srcdir)/$(DEVEL_REFMAN_LATEX))
+ ($(srcdir)/devel-refman-html.stamp)
+ ($(srcdir)/$(DEVEL_REFMAN_HTML)):
+ Remove targets.
+ ($(srcdir)/user-refman.stamp)
+ ($(srcdir)/$(USER_REFMAN))
+ ($(srcdir)/devel-refman.stamp)
+ ($(srcdir)/$(DEVEL_REFMAN)):
+ New targets.
+ ($(srcdir)/$(USER_REFMAN_PDF), $(srcdir)/$(DEVEL_REFMAN_PDF)):
+ Adjust targets.
+ (regen-doc, regen-devel-doc): New (phony) targets.
+ (clean-user-refman-latex, clean-user-refman-html)
+ (clean-devel-refman-latex, clean-devel-refman-html):
+ Remove (phony) targets.
+ (maintainer-clean-local): Adjust.
+ (edit_pdf): Remove variable.
+ (EXTRA_DIST): Remove $(USER_REFMAN_HTML).
+ Add $(USER_REFMAN)/html.
+ (install-data-local, uninstall-local): Adjust.
+ (CLEANFILES): Remove Doxyfile_user, Doxyfile_user_pdf,
+ Doxyfile_devel, Doxyfile_devel_pdf, devel and user.
+ (MAINTAINERCLEANFILES): Add Doxyfile_user and Doxyfile_devel.
+ ($(DOXYFILE_USER_PDF), $(DOXYFILE_USER_HTML))
+ ($(DOXYFILE_DEVEL_PDF), $(DOXYFILE_DEVEL_HTML)):
+ Remove targets.
+ ($(DOXYFILE_USER), $(DOXYFILE_DEVEL)):
+ New targets.
+
+2010-03-08 Roland Levillain <roland(a)lrde.epita.fr>
+
Shorten the list of files visited by Doxygen.
* doc/Doxyfile.in (STRIP_FROM_PATH, INPUT, IMAGE_PATH):
diff --git a/milena/doc/.gitignore b/milena/doc/.gitignore
index 8670dd7..4b96d25 100644
--- a/milena/doc/.gitignore
+++ b/milena/doc/.gitignore
@@ -1,9 +1,11 @@
/Doxyfile_devel
-/Doxyfile_devel_pdf
/Doxyfile_user
-/Doxyfile_user_pdf
/devel
+/devel-refman
+/devel-refman.pdf
/user
+/user-refman
+/user-refman.pdf
/figures/*.png
/ref_guide/ref_guide.haux
/ref_guide/ref_guide.hh
@@ -21,8 +23,6 @@
/tutorial/tutorial.hh-e
/tutorial/tutorial.html
/tutorial/tutorial.pdf
-/user-refman-html
-/user-refman.pdf
/white_paper/figures/house.eps
/white_paper/figures/house_rag.eps
/white_paper/figures/house_wshed.eps
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index e8f06cb..505480a 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -102,11 +102,9 @@ EXCLUDE = @top_srcdir@/milena/sandbox \
@top_srcdir@/milena/mln/core/concept/proxy.hxx \
@top_srcdir@/milena/doc/examples/trash \
@top_srcdir@/milena/doc/user \
- @top_srcdir@/milena/doc/user-refman-html \
- @top_srcdir@/milena/doc/user-refman-latex \
+ @top_srcdir@/milena/doc/user-refman
@top_srcdir@/milena/doc/devel \
- @top_srcdir@/milena/doc/devel-refman-html \
- @top_srcdir@/milena/doc/devel-refman-latex \
+ @top_srcdir@/milena/doc/devel-refman
@top_srcdir@/milena/tests/unit_test
EXCLUDE_SYMLINKS = YES
EXCLUDE_PATTERNS = *spe.hh
@@ -167,7 +165,7 @@ TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
+GENERATE_LATEX = YES
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index 3d5f4d9..b37044f 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -35,8 +35,8 @@ CLEANFILES =
.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
+ ref-doc ref-doc-pdf \
+ ref-doc-devel ref-doc-devel-pdf
doc: doc-user doc-devel
@@ -45,12 +45,12 @@ 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-html: tutorial-html white-paper-html ref-guide-html ref-doc
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-devel
## -------------------------------------------------- ##
@@ -65,204 +65,127 @@ EXTRA_DEPS = $(srcdir)/tutorial/tutorial.hh $(srcdir)/ref_guide/ref_guide.hh
## Doxygen documentation. ##
## ----------------------- ##
-## FIXME: We should use a stamp file and generate the documentation in
-## a temporary directory in the _build_ tree, then copy it into a
-## directory of the _source_ tree. See how this is implemented in
-## Vaucanson's doc build system. (Do not forget to adjust Doxyfiles.)
+# ----------------------- #
+# User reference manual. #
+# ----------------------- #
-# ----------------------------- #
-# User reference manual (PDF). #
-# ----------------------------- #
+all-local: $(srcdir)/$(USER_REFMAN) $(srcdir)/$(USER_REFMAN_PDF)
-# FIXME: Keep it or throw it away?
-all-local: $(srcdir)/$(USER_REFMAN_PDF)
+# Run "make regen-doc" to forcefully rebuild the Doxygen documentation.
+.PHONY: regen-doc
+regen-doc:
+ -rm -f $(srcdir)/user-refman.stamp
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/user-refman.stamp
-DOXYFILE_USER_PDF = Doxyfile_user_pdf
+DOXYFILE_USER = Doxyfile_user
## FIXME: Rename USER_REFMAN_PDF to something else?
USER_REFMAN_PDF = user-refman.pdf
## FIXME: Likewise?
-USER_REFMAN_LATEX = user-refman-latex
+USER_REFMAN = user-refman
ref-doc-pdf: $(srcdir)/$(USER_REFMAN_PDF)
+ref-doc: $(srcdir)/$(USER_REFMAN)
# FIXME: Use texi2dvi instead of Doxygen's generated Makefile?
# (The LaTeX to PDF rule could be factored using a suffix rule, as in
# LRDE's share/).
-$(srcdir)/$(USER_REFMAN_PDF): $(srcdir)/$(USER_REFMAN_LATEX)
- cd $(srcdir)/$(USER_REFMAN_LATEX) && $(MAKE) $(AM_MAKEFLAGS) pdf
- cp -f $(srcdir)/$(USER_REFMAN_LATEX)/refman.pdf $@
+$(srcdir)/$(USER_REFMAN_PDF): $(srcdir)/$(USER_REFMAN)
+ cd $(srcdir)/$(USER_REFMAN)/latex && $(MAKE) $(AM_MAKEFLAGS) pdf
+ cp -f $(srcdir)/$(USER_REFMAN)/latex/refman.pdf $@
-## FIXME: Use a variable instead of `$(srcdir)/user/latex'.
+## FIXME: Use a variable instead of `$(srcdir)/user' directly?
##
## FIXME: Are dependencies $(srcdir)/figures.stamp $(EXTRA_DEPS) set
## on the right rule? Does Doxygen make a copy of figures, or does it
## generate LaTeX inputs relying on the existence of such figures in
## the initial location? Investigate.
-$(srcdir)/user-refman-latex.stamp: $(srcdir)/$(DOXYFILE).in $(srcdir)/figures.stamp $(EXTRA_DEPS)
+$(srcdir)/user-refman.stamp: $(srcdir)/$(DOXYFILE).in $(srcdir)/figures.stamp $(EXTRA_DEPS)
@rm -f $@.tmp
@touch $@.tmp
- -rm -rf $(srcdir)/user/latex
- $(MAKE) $(AM_MAKE_FLAGS) $(DOXYFILE_USER_PDF)
- $(DOXYGEN) $(DOXYFILE_USER_PDF)
+ -rm -rf $(srcdir)/user
+ $(MAKE) $(AM_MAKE_FLAGS) $(DOXYFILE_USER)
+ $(DOXYGEN) $(DOXYFILE_USER)
## Doxygen may generate an incomplete output and exit with success!
## Check some files before deeming the output as acceptable.
test -f $(srcdir)/user/latex/refman.tex
- -rm -rf $(srcdir)/$(USER_REFMAN_LATEX)
-## FIXME: moving directories between file systems is not portable.
- mv $(srcdir)/user/latex $(srcdir)/$(USER_REFMAN_LATEX)
+ -rm -rf $(srcdir)/$(USER_REFMAN)
+## FIXME: Moving directories between file systems is not portable.
+ mv $(srcdir)/user $(srcdir)/$(USER_REFMAN)
@mv -f $@.tmp $@
-# FIXME: Probably superfluous. Should vanish when HTML and LaTeX
-# genarations are merged.
-$(srcdir)/$(USER_REFMAN_LATEX): $(srcdir)/user-refman-latex.stamp
+$(srcdir)/$(USER_REFMAN): $(srcdir)/user-refman.stamp
## Recover from the removal of $@
@if test -d $@; then :; else \
rm -f $<; \
$(MAKE) $(AM_MAKEFLAGS) $<; \
fi
-# Clean Doxygen products.
-.PHONY: clean-user-refman-latex
-clean-user-refman-latex:
- rm -rf $(srcdir)/user/latex $(srcdir)/$(USER_REFMAN_LATEX)
-
-# ------------------------------ #
-# User reference manual (HTML). #
-# ------------------------------ #
-
-# FIXME: Keep it or throw it away?
-all-local: $(srcdir)/user-refman-html.stamp
-
-# FIXME: Rename USER_REFMAN_HTML as DOCDIR_USER_HTML?
-USER_REFMAN_HTML = user-refman-html
+# ---------------------------- #
+# Developer reference manual. #
+# ---------------------------- #
-DOXYFILE_USER_HTML = Doxyfile_user_html
+# Run "make regen-devel-doc" to forcefully rebuild the Doxygen
+# developer documentation.
+.PHONY: regen-devel-doc
+regen-devel-doc:
+ -rm -f $(srcdir)/devel-refman.stamp
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/devel-refman.stamp
-ref-doc-html: $(srcdir)/$(USER_REFMAN_HTML)
-
-# FIXME: Use `$(USER_REFMAN_HTML).tmp' instead of `$(srcdir)/user/html'.
-$(srcdir)/user-refman-html.stamp: $(srcdir)/$(DOXYFILE).in $(srcdir)/figures.stamp $(EXTRA_DEPS)
- @rm -f $@.tmp
- @touch $@.tmp
- -rm -rf $(srcdir)/user/html
- $(MAKE) $(AM_MAKE_FLAGS) $(DOXYFILE_USER_HTML)
- $(DOXYGEN) $(DOXYFILE_USER_HTML)
- -rm -rf $(srcdir)/$(USER_REFMAN_HTML)
-## FIXME: moving directories between file systems is not portable.
- mv $(srcdir)/user/html $(srcdir)/$(USER_REFMAN_HTML)
- @mv -f $@.tmp $@
-
-$(srcdir)/$(USER_REFMAN_HTML): $(srcdir)/user-refman-html.stamp
-## Recover from the removal of $@
- @if test -d $@; then :; else \
- rm -f $<; \
- $(MAKE) $(AM_MAKEFLAGS) $<; \
- fi
-
-# Clean Doxygen products.
-.PHONY: clean-user-refman-html
-clean-user-refman-html:
- rm -rf $(srcdir)/user/html $(srcdir)/$(USER_REFMAN_HTML)
-
-# ---------------------------------- #
-# Developer reference manual (PDF). #
-# ---------------------------------- #
-
-DOXYFILE_DEVEL_PDF = Doxyfile_devel_pdf
+DOXYFILE_DEVEL = Doxyfile_devel
## FIXME: Rename DEVEL_REFMAN_PDF to something else?
DEVEL_REFMAN_PDF = devel-refman-pdf
## FIXME: Likewise?
-DEVEL_REFMAN_LATEX = devel-refman-latex
+DEVEL_REFMAN = devel-refman
ref-doc-devel-pdf: $(srcdir)/$(DEVEL_REFMAN_PDF)
+ref-doc-devel: $(srcdir)/$(DEVEL_REFMAN)
+# Be warned, most LaTeX installations will not be able to compile the
+# PDF development documentation as-is, as TeX's default memory
+# capacities are usually too small to handle such a large document.
+#
## FIXME: Use texi2dvi instead of Doxygen's generated Makefile? (The
## LaTeX to PDF rule could be factored using a suffix rule, as in
## LRDE's share/).
-$(srcdir)/$(DEVEL_REFMAN_PDF): $(srcdir)/$(DEVEL_REFMAN_LATEX)
- cd $(srcdir)/$(DEVEL_REFMAN_LATEX) && $(MAKE) $(AM_MAKEFLAGS) pdf
- cp -f $(srcdir)/$(DEVEL_REFMAN_LATEX)/refman.pdf $@
+$(srcdir)/$(DEVEL_REFMAN_PDF): $(srcdir)/$(DEVEL_REFMAN)
+ cd $(srcdir)/$(DEVEL_REFMAN)/latex && $(MAKE) $(AM_MAKEFLAGS) pdf
+ cp -f $(srcdir)/$(DEVEL_REFMAN)/latex/refman.pdf $@
-## FIXME: Use a variable instead of `$(srcdir)/devel/latex'.
+## FIXME: Use a variable instead of `$(srcdir)/devel' directly?
##
## FIXME: Are dependencies $(srcdir)/figures.stamp $(EXTRA_DEPS) set
## on the right rule? Does Doxygen make a copy of figures, or does it
## generate LaTeX inputs relying on the existence of such figures in
## the initial location? Investigate.
-$(srcdir)/devel-refman-latex.stamp: $(srcdir)/$(DOXYFILE).in $(srcdir)/figures.stamp $(EXTRA_DEPS)
+$(srcdir)/devel-refman.stamp: $(srcdir)/$(DOXYFILE).in $(srcdir)/figures.stamp $(EXTRA_DEPS)
@rm -f $@.tmp
@touch $@.tmp
- -rm -rf $(srcdir)/devel/latex
- $(MAKE) $(AM_MAKE_FLAGS) $(DOXYFILE_DEVEL_PDF)
- $(DOXYGEN) $(DOXYFILE_DEVEL_PDF)
+ -rm -rf $(srcdir)/devel
+ $(MAKE) $(AM_MAKE_FLAGS) $(DOXYFILE_DEVEL)
+ $(DOXYGEN) $(DOXYFILE_DEVEL)
## Doxygen may generate an incomplete output and exit with success!
## Check some files before deeming the output as acceptable.
test -f $(srcdir)/devel/latex/refman.tex
- -rm -rf $(srcdir)/$(DEVEL_REFMAN_LATEX)
-## FIXME: moving directories between file systems is not portable.
- mv $(srcdir)/devel/latex $(srcdir)/$(DEVEL_REFMAN_LATEX)
+ -rm -rf $(srcdir)/$(DEVEL_REFMAN)
+## FIXME: Moving directories between file systems is not portable.
+ mv $(srcdir)/devel $(srcdir)/$(DEVEL_REFMAN)
@mv -f $@.tmp $@
-# FIXME: Probably superfluous. Should vanish when HTML and LaTeX
-# genarations are merged.
-$(srcdir)/$(DEVEL_REFMAN_LATEX): $(srcdir)/devel-refman-latex.stamp
+$(srcdir)/$(DEVEL_REFMAN): $(srcdir)/devel-refman.stamp
## Recover from the removal of $@
@if test -d $@; then :; else \
rm -f $<; \
$(MAKE) $(AM_MAKEFLAGS) $<; \
fi
-# Clean Doxygen products.
-.PHONY: clean-devel-refman-latex
-clean-devel-refman-latex:
- rm -rf $(srcdir)/devel/latex $(srcdir)/$(DEVEL_REFMAN_LATEX)
-
-# ----------------------------------- #
-# Developer reference manual (HTML). #
-# ----------------------------------- #
-
-# FIXME: Rename DEVEL_REFMAN_HTML as DOCDIR_DEVEL_HTML?
-DEVEL_REFMAN_HTML = devel-refman-html
-
-DOXYFILE_DEVEL_HTML = Doxyfile_devel_html
-
-ref-doc-devel-html: $(srcdir)/$(DEVEL_REFMAN_HTML)
-
-# FIXME: Use `$(DEVEL_REFMAN_HTML).tmp' instead of `$(srcdir)/devel/html'.
-$(srcdir)/devel-refman-html.stamp: $(srcdir)/$(DOXYFILE).in $(srcdir)/figures.stamp $(EXTRA_DEPS)
- @rm -f $@.tmp
- @touch $@.tmp
- -rm -rf $(srcdir)/devel/html
- $(MAKE) $(AM_MAKE_FLAGS) $(DOXYFILE_DEVEL_HTML)
- $(DOXYGEN) $(DOXYFILE_DEVEL_HTML)
- -rm -rf $(srcdir)/$(DEVEL_REFMAN_HTML)
-## FIXME: moving directories between file systems is not portable.
- mv $(srcdir)/devel/html $(srcdir)/$(DEVEL_REFMAN_HTML)
- @mv -f $@.tmp $@
-
-$(srcdir)/$(DEVEL_REFMAN_HTML): $(srcdir)/devel-refman-html.stamp
-## Recover from the removal of $@
- @if test -d $@; then :; else \
- rm -f $<; \
- $(MAKE) $(AM_MAKEFLAGS) $<; \
- fi
# Clean Doxygen products.
-.PHONY: clean-devel-refman-html
-clean-devel-refman-html:
- rm -rf $(srcdir)/devel/html $(srcdir)/$(DEVEL_REFMAN_HTML)
-
-# ---------- #
-# Cleaning. #
-# ---------- #
-
-maintainer-clean-local: clean-user-refman-latex clean-user-refman-html
-maintainer-clean-local: clean-devel-refman-latex clean-devel-refman-html
maintainer-clean-local:
- rm -rf $(srcdir)/user
- rm -rf $(srcdir)/devel
+ -rm -rf $(srcdir)/user $(srcdir)/$(USER_REFMAN)
+ -rm -rf $(srcdir)/devel $(srcdir)/$(DEVEL_REFMAN)
+
## ------------------------- ##
## Technical Documentation. ##
@@ -270,18 +193,21 @@ maintainer-clean-local:
include $(srcdir)/technical/technical.mk
+
## ---------- ##
## Tutorial. ##
## ---------- ##
include $(srcdir)/tutorial/tutorial.mk
+
## ------------- ##
## White Paper. ##
## ------------- ##
include $(srcdir)/white_paper/white_paper.mk
+
## ----------------- ##
## Reference Guide. ##
## ----------------- ##
@@ -289,6 +215,9 @@ include $(srcdir)/white_paper/white_paper.mk
include $(srcdir)/ref_guide/ref_guide.mk
+## --------- ##
+## Figures. ##
+## --------- ##
# Make sure the figures are the first files in EXTRA_DIST.
# Make the 'fake-doc' rule works correctly.
@@ -315,39 +244,6 @@ $(srcdir)/figures.stamp: $(FIGURES_SRCDIR)/*.p*m
mv -f $@.tmp $@
-edit = sed -e "s|@ID@|$$Id|" \
- -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
- -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
- -e 's,@top_srcdir\@,$(top_srcdir),g' \
- -e 's,@top_builddir\@,$(top_builddir),g' \
- -e 's,@srcdir\@,$(srcdir),g' \
- -e 's,@builddir\@,$(builddir),g'
-
-## FIXME: Instead of generating HTML and PDF (LaTeX actualy) output in
-## two passes, do it in a row. It will save us a lot of time.
-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 (devel and user) using @VARIABLES@. Don't generate
-# Doxyfile_user_html from Doxyfile_devel_html! Both should be a product
-# derived from a single source, Doxyfile.in.
-edit_user = sed \
- -e 's,OUTPUT_DIRECTORY = @srcdir@/devel/,OUTPUT_DIRECTORY = @srcdir@/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' \
- -e 's,EXTRACT_LOCAL_CLASSES = YES,EXTRACT_LOCAL_CLASSES = NO,g' \
- -e 's,HIDE_UNDOC_MEMBERS = NO,HIDE_UNDOC_MEMBERS = YES,g' \
- -e 's,HIDE_UNDOC_CLASSES = NO,HIDE_UNDOC_CLASSES = YES,g' \
- -e 's,HIDE_FRIEND_COMPOUNDS = NO,HIDE_FRIEND_COMPOUNDS = YES,g' \
- -e 's,HIDE_IN_BODY_DOCS = NO,HIDE_IN_BODY_DOCS = YES,g' \
- -e 's,INTERNAL_DOCS = YES,INTERNAL_DOCS = NO,g' \
- -e 's,GENERATE_TODOLIST = YES,GENERATE_TODOLIST = NO,g' \
- -e 's,PROJECT_NUMBER = \",PROJECT_NUMBER = \"User documentation ,g' \
- -e 's,EXCLUDE_SYMBOLS =,EXCLUDE_SYMBOLS = *::internal* *_ mln::trait::*,g'
-
-
## ---------- ##
## Examples. ##
## ---------- ##
@@ -384,21 +280,27 @@ include $(srcdir)/examples/examples.mk
include $(srcdir)/outputs/outputs.mk
+## -------------- ##
+## Installation. ##
+## -------------- ##
+
+# PDF.
dist_doc_DATA += $(USER_REFMAN_PDF)
+# HTML.
# Installing a directory located in the source dir is not supported by
-# Automake by default, so we cannot add `USER_REFMAN_HTML' to
+# Automake by default, so we cannot add `$(USER_REFMAN)/html' to
# `dist_doc_DATA'. The following two rules are are workaround from
# the Vaucanson project.
-EXTRA_DIST += $(USER_REFMAN_HTML)
+EXTRA_DIST += $(USER_REFMAN)/html
# We install by hand, otherwise Automake produces "install .../srcdoc
# .../srcdoc", which installs our dir into the previous one, instead
# of replacing it.
install-data-local:
- rm -rf $(DESTDIR)$(htmldir)/$(USER_REFMAN_HTML)
+ rm -rf $(DESTDIR)$(htmldir)/$(USER_REFMAN)/html
$(mkdir_p) $(DESTDIR)$(htmldir)
- cp -r $(srcdir)/$(USER_REFMAN_HTML) $(DESTDIR)$(htmldir)
+ cp -r $(srcdir)/$(USER_REFMAN)/html $(DESTDIR)$(htmldir)/user-refman
## Try GNU chmod's X mode before resorting to something slower but
## more standard.
chmod -R a+rX $(DESTDIR)$(htmldir) || \
@@ -406,18 +308,12 @@ install-data-local:
-o -exec chmod a+r {} \;
uninstall-local:
- chmod -R 700 $(DESTDIR)$(htmldir)/$(USER_REFMAN_HTML)
- rm -rf $(DESTDIR)$(htmldir)/$(USER_REFMAN_HTML)
+ chmod -R 700 $(DESTDIR)$(htmldir)/user-refman
+ rm -rf $(DESTDIR)$(htmldir)/user-refman
-## FIXME: These are now generated in the build directory.
-# EXTRA_DIST += \
-# Doxyfile_devel_html \
-# Doxyfile_devel_pdf \
-# Doxyfile_user_html \
-# Doxyfile_user_pdf
EXTRA_DIST += \
- $(DOXYFILE).in \
+ $(DOXYFILE).in \
groups/accu.hh \
groups/graph.hh \
groups/images.hh \
@@ -435,45 +331,53 @@ EXTRA_DIST += \
tools/split_sample.sh \
tools/todoxygen.sh
-## FIXME: Unsure about this. If the directory of the generated
-## documentation is to be removed during `maintainer-clean' (see
-## Vaucanson's doc/Makefile.am), then the source Doxyfiles should not
-## be removed earlier (i.e. at `clean') !
-##
-## Note: if configure is used to generate Doxyfiles (see below), these
-## files should be (and will be automatically) remove by `distclean'.
-CLEANFILES += \
+MAINTAINERCLEANFILES = \
Doxyfile_user \
- Doxyfile_user_pdf \
- Doxyfile_devel \
- Doxyfile_devel_pdf \
- devel \
- user
+ Doxyfile_devel
+
+edit = sed -e "s|@ID@|$$Id|" \
+ -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
+ -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
+ -e 's,@top_srcdir\@,$(top_srcdir),g' \
+ -e 's,@top_builddir\@,$(top_builddir),g' \
+ -e 's,@srcdir\@,$(srcdir),g' \
+ -e 's,@builddir\@,$(builddir),g'
+
+# FIXME: This is not good. We should set these parameters for both
+# documentation (devel and user) using @VARIABLES@. Don't generate
+# Doxyfile_user_html from Doxyfile_devel_html! Both should be a product
+# derived from a single source, Doxyfile.in.
+edit_user = sed \
+ -e 's,OUTPUT_DIRECTORY = @srcdir@/devel/,OUTPUT_DIRECTORY = @srcdir@/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' \
+ -e 's,EXTRACT_LOCAL_CLASSES = YES,EXTRACT_LOCAL_CLASSES = NO,g' \
+ -e 's,HIDE_UNDOC_MEMBERS = NO,HIDE_UNDOC_MEMBERS = YES,g' \
+ -e 's,HIDE_UNDOC_CLASSES = NO,HIDE_UNDOC_CLASSES = YES,g' \
+ -e 's,HIDE_FRIEND_COMPOUNDS = NO,HIDE_FRIEND_COMPOUNDS = YES,g' \
+ -e 's,HIDE_IN_BODY_DOCS = NO,HIDE_IN_BODY_DOCS = YES,g' \
+ -e 's,INTERNAL_DOCS = YES,INTERNAL_DOCS = NO,g' \
+ -e 's,GENERATE_TODOLIST = YES,GENERATE_TODOLIST = NO,g' \
+ -e 's,PROJECT_NUMBER = \",PROJECT_NUMBER = \"User documentation ,g' \
+ -e 's,EXCLUDE_SYMBOLS =,EXCLUDE_SYMBOLS = *::internal* *_ mln::trait::*,g'
# Sed is used to generate Doxyfile from Doxyfile.in instead of
# configure, because the former is way faster than the latter.
#
## FIXME: This is because, as in TC, we depend on $Id$ from the
## ChangeLog. Maybe we should depend from something less prone to
-## change.
+## change. See Bison's build system.
##
## FIXME: Move these rules higher, closer to their use sites.
##
-## FIXME: There are too many indirect generations here. Simplify.
-
-# FIXME: Directly depend on $(DOXYFILE).in instead.
-$(DOXYFILE_USER_PDF): $(DOXYFILE_USER_HTML)
- $(edit_pdf) $< >$@
+## FIXME: It'd be more logical to generate $(DOXYFILE_DEVEL) from
+## $(DOXYFILE_USER), not the reverse.
-# FIXME: Directly depend on $(DOXYFILE).in instead.
-$(DOXYFILE_USER_HTML): $(DOXYFILE_DEVEL_HTML)
+$(DOXYFILE_USER): $(DOXYFILE_DEVEL)
$(edit_user) $< >$@
-# FIXME: Directly depend on $(DOXYFILE).in instead.
-$(DOXYFILE_DEVEL_PDF): $(DOXYFILE_DEVEL_HTML)
- $(edit_pdf) $< >$@
-
-$(DOXYFILE_DEVEL_HTML): $(srcdir)/$(DOXYFILE).in
+$(DOXYFILE_DEVEL): $(srcdir)/$(DOXYFILE).in
Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog \
| sed -e 's/\\\$$//g'`; \
- $(edit) $< >$@
+ $(edit) $< >$@
--
1.5.6.5
1
0
last-svn-commit-29-g0f1307f Have Doxyfile.in generate the user documentation.
by Roland Levillain 01 Apr '10
by Roland Levillain 01 Apr '10
01 Apr '10
* doc/Doxyfile.in: Switch settings to generate the user
documentation.
* doc/Makefile.am (edit_user): Remove variable.
(edit_devel): New variable.
($(DOXYFILE_USER)): Generate it directly from
$(srcdir)/$(DOXYFILE).in.
($(DOXYFILE_DEVEL)): Adjust to use edit_devel.
---
milena/ChangeLog | 12 ++++++++++++
milena/doc/Doxyfile.in | 26 +++++++++++++-------------
milena/doc/Makefile.am | 46 ++++++++++++++++++++++------------------------
3 files changed, 47 insertions(+), 37 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 00c949c..aa13460 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,17 @@
2010-03-08 Roland Levillain <roland(a)lrde.epita.fr>
+ Have Doxyfile.in generate the user documentation.
+
+ * doc/Doxyfile.in: Switch settings to generate the user
+ documentation.
+ * doc/Makefile.am (edit_user): Remove variable.
+ (edit_devel): New variable.
+ ($(DOXYFILE_USER)): Generate it directly from
+ $(srcdir)/$(DOXYFILE).in.
+ ($(DOXYFILE_DEVEL)): Adjust to use edit_devel.
+
+2010-03-08 Roland Levillain <roland(a)lrde.epita.fr>
+
Generate the HTML and LaTeX Doxygen documentation in a single pass.
* doc/Doxyfile.in (GENERATE_LATEX): Enable.
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index 505480a..a8c3400 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -21,8 +21,8 @@
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "Milena (@PACKAGE_NAME@)"
-PROJECT_NUMBER = "@PACKAGE_VERSION@ @ID@"
-OUTPUT_DIRECTORY = @srcdir@/devel/
+PROJECT_NUMBER = "User documentation @PACKAGE_VERSION@ @ID@"
+OUTPUT_DIRECTORY = @srcdir@/user/
CREATE_SUBDIRS = YES
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
@@ -50,16 +50,16 @@ SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = YES
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = NO
+EXTRACT_LOCAL_CLASSES = NO
EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = YES
+HIDE_UNDOC_MEMBERS = YES
+HIDE_UNDOC_CLASSES = YES
+HIDE_FRIEND_COMPOUNDS = YES
+HIDE_IN_BODY_DOCS = YES
+INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
@@ -67,7 +67,7 @@ INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = YES
SORT_BY_SCOPE_NAME = YES
-GENERATE_TODOLIST = YES
+GENERATE_TODOLIST = NO
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
@@ -108,7 +108,7 @@ EXCLUDE = @top_srcdir@/milena/sandbox \
@top_srcdir@/milena/tests/unit_test
EXCLUDE_SYMLINKS = YES
EXCLUDE_PATTERNS = *spe.hh
-EXCLUDE_SYMBOLS =
+EXCLUDE_SYMBOLS = *::internal* *_ mln::trait::*
EXAMPLE_PATH = @top_srcdir@/milena/doc/examples \
@top_srcdir@/milena/doc/outputs \
@top_srcdir@/milena/doc/examples/split \
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index b37044f..1126881 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -343,24 +343,20 @@ edit = sed -e "s|@ID@|$$Id|" \
-e 's,@srcdir\@,$(srcdir),g' \
-e 's,@builddir\@,$(builddir),g'
-# FIXME: This is not good. We should set these parameters for both
-# documentation (devel and user) using @VARIABLES@. Don't generate
-# Doxyfile_user_html from Doxyfile_devel_html! Both should be a product
-# derived from a single source, Doxyfile.in.
-edit_user = sed \
- -e 's,OUTPUT_DIRECTORY = @srcdir@/devel/,OUTPUT_DIRECTORY = @srcdir@/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' \
- -e 's,EXTRACT_LOCAL_CLASSES = YES,EXTRACT_LOCAL_CLASSES = NO,g' \
- -e 's,HIDE_UNDOC_MEMBERS = NO,HIDE_UNDOC_MEMBERS = YES,g' \
- -e 's,HIDE_UNDOC_CLASSES = NO,HIDE_UNDOC_CLASSES = YES,g' \
- -e 's,HIDE_FRIEND_COMPOUNDS = NO,HIDE_FRIEND_COMPOUNDS = YES,g' \
- -e 's,HIDE_IN_BODY_DOCS = NO,HIDE_IN_BODY_DOCS = YES,g' \
- -e 's,INTERNAL_DOCS = YES,INTERNAL_DOCS = NO,g' \
- -e 's,GENERATE_TODOLIST = YES,GENERATE_TODOLIST = NO,g' \
- -e 's,PROJECT_NUMBER = \",PROJECT_NUMBER = \"User documentation ,g' \
- -e 's,EXCLUDE_SYMBOLS =,EXCLUDE_SYMBOLS = *::internal* *_ mln::trait::*,g'
+edit_devel = sed \
+ -e 's,OUTPUT_DIRECTORY = @srcdir@/user/,OUTPUT_DIRECTORY = @srcdir@/devel/,' \
+ -e 's,EXTRACT_ALL = NO,EXTRACT_ALL = YES,' \
+ -e 's,EXTRACT_PRIVATE = NO,EXTRACT_PRIVATE = YES,' \
+ -e 's,EXTRACT_STATIC = NO,EXTRACT_STATIC = YES,' \
+ -e 's,EXTRACT_LOCAL_CLASSES = NO,EXTRACT_LOCAL_CLASSES = YES,' \
+ -e 's,HIDE_UNDOC_MEMBERS = YES,HIDE_UNDOC_MEMBERS = NO,' \
+ -e 's,HIDE_UNDOC_CLASSES = YES,HIDE_UNDOC_CLASSES = NO,' \
+ -e 's,HIDE_FRIEND_COMPOUNDS = YES,HIDE_FRIEND_COMPOUNDS = NO,' \
+ -e 's,HIDE_IN_BODY_DOCS = YES,HIDE_IN_BODY_DOCS = NO,' \
+ -e 's,INTERNAL_DOCS = NO,INTERNAL_DOCS = YES,' \
+ -e 's,GENERATE_TODOLIST = NO,GENERATE_TODOLIST = YES,' \
+ -e 's,PROJECT_NUMBER = \"User documentation ,PROJECT_NUMBER = \",' \
+ -e 's,EXCLUDE_SYMBOLS = \*::internal\* \*_ mln::trait::\*,EXCLUDE_SYMBOLS =,'
# Sed is used to generate Doxyfile from Doxyfile.in instead of
# configure, because the former is way faster than the latter.
@@ -370,14 +366,16 @@ edit_user = sed \
## change. See Bison's build system.
##
## FIXME: Move these rules higher, closer to their use sites.
-##
-## FIXME: It'd be more logical to generate $(DOXYFILE_DEVEL) from
-## $(DOXYFILE_USER), not the reverse.
-$(DOXYFILE_USER): $(DOXYFILE_DEVEL)
- $(edit_user) $< >$@
+$(DOXYFILE_USER): $(srcdir)/$(DOXYFILE).in
+ Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog \
+ | sed -e 's/\\\$$//g'`; \
+ $(edit) $< >$@
$(DOXYFILE_DEVEL): $(srcdir)/$(DOXYFILE).in
+ rm -f $@.tmp
Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog \
| sed -e 's/\\\$$//g'`; \
- $(edit) $< >$@
+ $(edit) $< >$@.tmp
+ $(edit_devel) $@.tmp >$@
+ rm -f $@.tmp
--
1.5.6.5
1
0
* doc/Makefile.am (edit, $(DOXYFILE_USER)):
Move these definitions closer to their use site.
(edit_devel, $(DOXYFILE_DEVEL)): Likewise.
---
milena/ChangeLog | 8 ++++
milena/doc/Makefile.am | 87 +++++++++++++++++++++++-------------------------
2 files changed, 50 insertions(+), 45 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index aa13460..70f35b2 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,13 @@
2010-03-08 Roland Levillain <roland(a)lrde.epita.fr>
+ Reorganize doc/Makefile.am.
+
+ * doc/Makefile.am (edit, $(DOXYFILE_USER)):
+ Move these definitions closer to their use site.
+ (edit_devel, $(DOXYFILE_DEVEL)): Likewise.
+
+2010-03-08 Roland Levillain <roland(a)lrde.epita.fr>
+
Have Doxyfile.in generate the user documentation.
* doc/Doxyfile.in: Switch settings to generate the user
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index 1126881..d53c208 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -79,6 +79,25 @@ regen-doc:
DOXYFILE_USER = Doxyfile_user
+# Sed is used to generate Doxyfile from Doxyfile.in instead of
+# configure, because the former is way faster than the latter.
+#
+## FIXME: This is because, as in TC, we depend on $Id$ from the
+## ChangeLog. Maybe we should depend from something less prone to
+## change. See Bison's build system.
+edit = sed -e "s|@ID@|$$Id|" \
+ -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
+ -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
+ -e 's,@top_srcdir\@,$(top_srcdir),g' \
+ -e 's,@top_builddir\@,$(top_builddir),g' \
+ -e 's,@srcdir\@,$(srcdir),g' \
+ -e 's,@builddir\@,$(builddir),g'
+
+$(DOXYFILE_USER): $(srcdir)/$(DOXYFILE).in
+ Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog \
+ | sed -e 's/\\\$$//g'`; \
+ $(edit) $< >$@
+
## FIXME: Rename USER_REFMAN_PDF to something else?
USER_REFMAN_PDF = user-refman.pdf
## FIXME: Likewise?
@@ -134,6 +153,29 @@ regen-devel-doc:
DOXYFILE_DEVEL = Doxyfile_devel
+edit_devel = sed \
+ -e 's,OUTPUT_DIRECTORY = @srcdir@/user/,OUTPUT_DIRECTORY = @srcdir@/devel/,' \
+ -e 's,EXTRACT_ALL = NO,EXTRACT_ALL = YES,' \
+ -e 's,EXTRACT_PRIVATE = NO,EXTRACT_PRIVATE = YES,' \
+ -e 's,EXTRACT_STATIC = NO,EXTRACT_STATIC = YES,' \
+ -e 's,EXTRACT_LOCAL_CLASSES = NO,EXTRACT_LOCAL_CLASSES = YES,' \
+ -e 's,HIDE_UNDOC_MEMBERS = YES,HIDE_UNDOC_MEMBERS = NO,' \
+ -e 's,HIDE_UNDOC_CLASSES = YES,HIDE_UNDOC_CLASSES = NO,' \
+ -e 's,HIDE_FRIEND_COMPOUNDS = YES,HIDE_FRIEND_COMPOUNDS = NO,' \
+ -e 's,HIDE_IN_BODY_DOCS = YES,HIDE_IN_BODY_DOCS = NO,' \
+ -e 's,INTERNAL_DOCS = NO,INTERNAL_DOCS = YES,' \
+ -e 's,GENERATE_TODOLIST = NO,GENERATE_TODOLIST = YES,' \
+ -e 's,PROJECT_NUMBER = \"User documentation ,PROJECT_NUMBER = \",' \
+ -e 's,EXCLUDE_SYMBOLS = \*::internal\* \*_ mln::trait::\*,EXCLUDE_SYMBOLS =,'
+
+$(DOXYFILE_DEVEL): $(srcdir)/$(DOXYFILE).in
+ rm -f $@.tmp
+ Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog \
+ | sed -e 's/\\\$$//g'`; \
+ $(edit) $< >$@.tmp
+ $(edit_devel) $@.tmp >$@
+ rm -f $@.tmp
+
## FIXME: Rename DEVEL_REFMAN_PDF to something else?
DEVEL_REFMAN_PDF = devel-refman-pdf
## FIXME: Likewise?
@@ -334,48 +376,3 @@ EXTRA_DIST += \
MAINTAINERCLEANFILES = \
Doxyfile_user \
Doxyfile_devel
-
-edit = sed -e "s|@ID@|$$Id|" \
- -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
- -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
- -e 's,@top_srcdir\@,$(top_srcdir),g' \
- -e 's,@top_builddir\@,$(top_builddir),g' \
- -e 's,@srcdir\@,$(srcdir),g' \
- -e 's,@builddir\@,$(builddir),g'
-
-edit_devel = sed \
- -e 's,OUTPUT_DIRECTORY = @srcdir@/user/,OUTPUT_DIRECTORY = @srcdir@/devel/,' \
- -e 's,EXTRACT_ALL = NO,EXTRACT_ALL = YES,' \
- -e 's,EXTRACT_PRIVATE = NO,EXTRACT_PRIVATE = YES,' \
- -e 's,EXTRACT_STATIC = NO,EXTRACT_STATIC = YES,' \
- -e 's,EXTRACT_LOCAL_CLASSES = NO,EXTRACT_LOCAL_CLASSES = YES,' \
- -e 's,HIDE_UNDOC_MEMBERS = YES,HIDE_UNDOC_MEMBERS = NO,' \
- -e 's,HIDE_UNDOC_CLASSES = YES,HIDE_UNDOC_CLASSES = NO,' \
- -e 's,HIDE_FRIEND_COMPOUNDS = YES,HIDE_FRIEND_COMPOUNDS = NO,' \
- -e 's,HIDE_IN_BODY_DOCS = YES,HIDE_IN_BODY_DOCS = NO,' \
- -e 's,INTERNAL_DOCS = NO,INTERNAL_DOCS = YES,' \
- -e 's,GENERATE_TODOLIST = NO,GENERATE_TODOLIST = YES,' \
- -e 's,PROJECT_NUMBER = \"User documentation ,PROJECT_NUMBER = \",' \
- -e 's,EXCLUDE_SYMBOLS = \*::internal\* \*_ mln::trait::\*,EXCLUDE_SYMBOLS =,'
-
-# Sed is used to generate Doxyfile from Doxyfile.in instead of
-# configure, because the former is way faster than the latter.
-#
-## FIXME: This is because, as in TC, we depend on $Id$ from the
-## ChangeLog. Maybe we should depend from something less prone to
-## change. See Bison's build system.
-##
-## FIXME: Move these rules higher, closer to their use sites.
-
-$(DOXYFILE_USER): $(srcdir)/$(DOXYFILE).in
- Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog \
- | sed -e 's/\\\$$//g'`; \
- $(edit) $< >$@
-
-$(DOXYFILE_DEVEL): $(srcdir)/$(DOXYFILE).in
- rm -f $@.tmp
- Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog \
- | sed -e 's/\\\$$//g'`; \
- $(edit) $< >$@.tmp
- $(edit_devel) $@.tmp >$@
- rm -f $@.tmp
--
1.5.6.5
1
0
last-svn-commit-31-g3e34860 bootstrap: Fix a typo in an error message.
by Roland Levillain 01 Apr '10
by Roland Levillain 01 Apr '10
01 Apr '10
---
ChangeLog | 4 ++++
bootstrap | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f8f1880..fe03f1a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-08 Roland Levillain <roland(a)lrde.epita.fr>
+
+ * bootstrap: Fix a typo in an error message.
+
2010-03-03 Roland Levillain <roland(a)lrde.epita.fr>
* configure.ac: Do not configure milena/doc/examples/Makefile.
diff --git a/bootstrap b/bootstrap
index 17324b4..fc71583 100755
--- a/bootstrap
+++ b/bootstrap
@@ -87,7 +87,7 @@ require ()
test x"$version" != x ||
fatal "$1 is required"
case $(version_compare "$2" "$version") in
- '>') fatal "$1 $2 or better is required: this is $1 $2";;
+ '>') fatal "$1 $2 or better is required: this is $1 $version";;
esac
}
--
1.5.6.5
1
0
last-svn-commit-32-g92124b5 Require Doxygen 1.5.6 at bootstrapping time.
by Roland Levillain 01 Apr '10
by Roland Levillain 01 Apr '10
01 Apr '10
* bootstrap: Here.
(require): Be more tolerant w.r.t. version messages.
---
ChangeLog | 7 +++++++
bootstrap | 4 +++-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fe03f1a..494243b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2010-03-08 Roland Levillain <roland(a)lrde.epita.fr>
+ Require Doxygen 1.5.6 at bootstrapping time.
+
+ * bootstrap: Here.
+ (require): Be more tolerant w.r.t. version messages.
+
+2010-03-08 Roland Levillain <roland(a)lrde.epita.fr>
+
* bootstrap: Fix a typo in an error message.
2010-03-03 Roland Levillain <roland(a)lrde.epita.fr>
diff --git a/bootstrap b/bootstrap
index fc71583..62cc724 100755
--- a/bootstrap
+++ b/bootstrap
@@ -83,7 +83,7 @@ version_compare ()
# Test that TOOL exists, and its version is at least REQUIREMENT.
require ()
{
- local version=$($1 --version | sed -n 's/.*[^0-9.]\([0-9][0-9.]*\).*/\1/p;q')
+ local version=$($1 --version | sed -n 's/[^0-9.]*\([0-9][0-9.]*\).*/\1/p;q')
test x"$version" != x ||
fatal "$1 is required"
case $(version_compare "$2" "$version") in
@@ -125,6 +125,8 @@ done
export LIBTOOLIZE=$libtoolize
require $libtoolize 1.5.22
+require doxygen 1.5.6
+
# Tell what's going on.
set -x
--
1.5.6.5
1
0
last-svn-commit-33-gd510e3e Have Doxygen generate its outputs in the build directory.
by Roland Levillain 01 Apr '10
by Roland Levillain 01 Apr '10
01 Apr '10
* doc/Doxyfile.in (OUTPUT_DIRECTORY):
s,@srcdir@/user/,@builddir@/user-refman.tmp,.
(EXCLUDE): Adjust.
* doc/Makefile.am (edit_devel): Adjust.
($(srcdir)/user-refman.stamp)
($(srcdir)/devel-refman.stamp)
(maintainer-clean-local):
Adjust targets.
---
milena/ChangeLog | 13 +++++++++++++
milena/doc/.gitignore | 2 --
milena/doc/Doxyfile.in | 4 +---
milena/doc/Makefile.am | 22 +++++++++-------------
4 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 70f35b2..8ca0adf 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,18 @@
2010-03-08 Roland Levillain <roland(a)lrde.epita.fr>
+ Have Doxygen generate its outputs in the build directory.
+
+ * doc/Doxyfile.in (OUTPUT_DIRECTORY):
+ s,@srcdir@/user/,@builddir@/user-refman.tmp,.
+ (EXCLUDE): Adjust.
+ * doc/Makefile.am (edit_devel): Adjust.
+ ($(srcdir)/user-refman.stamp)
+ ($(srcdir)/devel-refman.stamp)
+ (maintainer-clean-local):
+ Adjust targets.
+
+2010-03-08 Roland Levillain <roland(a)lrde.epita.fr>
+
Reorganize doc/Makefile.am.
* doc/Makefile.am (edit, $(DOXYFILE_USER)):
diff --git a/milena/doc/.gitignore b/milena/doc/.gitignore
index 4b96d25..9c55456 100644
--- a/milena/doc/.gitignore
+++ b/milena/doc/.gitignore
@@ -1,9 +1,7 @@
/Doxyfile_devel
/Doxyfile_user
-/devel
/devel-refman
/devel-refman.pdf
-/user
/user-refman
/user-refman.pdf
/figures/*.png
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index a8c3400..5b20a7c 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -22,7 +22,7 @@
#---------------------------------------------------------------------------
PROJECT_NAME = "Milena (@PACKAGE_NAME@)"
PROJECT_NUMBER = "User documentation @PACKAGE_VERSION@ @ID@"
-OUTPUT_DIRECTORY = @srcdir@/user/
+OUTPUT_DIRECTORY = @builddir@/user-refman.tmp
CREATE_SUBDIRS = YES
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
@@ -101,9 +101,7 @@ EXCLUDE = @top_srcdir@/milena/sandbox \
@top_srcdir@/milena/trash \
@top_srcdir@/milena/mln/core/concept/proxy.hxx \
@top_srcdir@/milena/doc/examples/trash \
- @top_srcdir@/milena/doc/user \
@top_srcdir@/milena/doc/user-refman
- @top_srcdir@/milena/doc/devel \
@top_srcdir@/milena/doc/devel-refman
@top_srcdir@/milena/tests/unit_test
EXCLUDE_SYMLINKS = YES
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index d53c208..49cf5a5 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -113,8 +113,6 @@ $(srcdir)/$(USER_REFMAN_PDF): $(srcdir)/$(USER_REFMAN)
cd $(srcdir)/$(USER_REFMAN)/latex && $(MAKE) $(AM_MAKEFLAGS) pdf
cp -f $(srcdir)/$(USER_REFMAN)/latex/refman.pdf $@
-## FIXME: Use a variable instead of `$(srcdir)/user' directly?
-##
## FIXME: Are dependencies $(srcdir)/figures.stamp $(EXTRA_DEPS) set
## on the right rule? Does Doxygen make a copy of figures, or does it
## generate LaTeX inputs relying on the existence of such figures in
@@ -122,15 +120,15 @@ $(srcdir)/$(USER_REFMAN_PDF): $(srcdir)/$(USER_REFMAN)
$(srcdir)/user-refman.stamp: $(srcdir)/$(DOXYFILE).in $(srcdir)/figures.stamp $(EXTRA_DEPS)
@rm -f $@.tmp
@touch $@.tmp
- -rm -rf $(srcdir)/user
+ -rm -rf $(USER_REFMAN).tmp
$(MAKE) $(AM_MAKE_FLAGS) $(DOXYFILE_USER)
$(DOXYGEN) $(DOXYFILE_USER)
## Doxygen may generate an incomplete output and exit with success!
## Check some files before deeming the output as acceptable.
- test -f $(srcdir)/user/latex/refman.tex
+ test -f $(USER_REFMAN).tmp/latex/refman.tex
-rm -rf $(srcdir)/$(USER_REFMAN)
## FIXME: Moving directories between file systems is not portable.
- mv $(srcdir)/user $(srcdir)/$(USER_REFMAN)
+ mv $(USER_REFMAN).tmp $(srcdir)/$(USER_REFMAN)
@mv -f $@.tmp $@
$(srcdir)/$(USER_REFMAN): $(srcdir)/user-refman.stamp
@@ -154,7 +152,7 @@ regen-devel-doc:
DOXYFILE_DEVEL = Doxyfile_devel
edit_devel = sed \
- -e 's,OUTPUT_DIRECTORY = @srcdir@/user/,OUTPUT_DIRECTORY = @srcdir@/devel/,' \
+ -e 's,OUTPUT_DIRECTORY = @builddir@/user-refman.tmp/,OUTPUT_DIRECTORY = @builddir@/devel-refman.tmp/,' \
-e 's,EXTRACT_ALL = NO,EXTRACT_ALL = YES,' \
-e 's,EXTRACT_PRIVATE = NO,EXTRACT_PRIVATE = YES,' \
-e 's,EXTRACT_STATIC = NO,EXTRACT_STATIC = YES,' \
@@ -195,8 +193,6 @@ $(srcdir)/$(DEVEL_REFMAN_PDF): $(srcdir)/$(DEVEL_REFMAN)
cd $(srcdir)/$(DEVEL_REFMAN)/latex && $(MAKE) $(AM_MAKEFLAGS) pdf
cp -f $(srcdir)/$(DEVEL_REFMAN)/latex/refman.pdf $@
-## FIXME: Use a variable instead of `$(srcdir)/devel' directly?
-##
## FIXME: Are dependencies $(srcdir)/figures.stamp $(EXTRA_DEPS) set
## on the right rule? Does Doxygen make a copy of figures, or does it
## generate LaTeX inputs relying on the existence of such figures in
@@ -204,15 +200,15 @@ $(srcdir)/$(DEVEL_REFMAN_PDF): $(srcdir)/$(DEVEL_REFMAN)
$(srcdir)/devel-refman.stamp: $(srcdir)/$(DOXYFILE).in $(srcdir)/figures.stamp $(EXTRA_DEPS)
@rm -f $@.tmp
@touch $@.tmp
- -rm -rf $(srcdir)/devel
+ -rm -rf $(DEVEL_REFMAN).tmp
$(MAKE) $(AM_MAKE_FLAGS) $(DOXYFILE_DEVEL)
$(DOXYGEN) $(DOXYFILE_DEVEL)
## Doxygen may generate an incomplete output and exit with success!
## Check some files before deeming the output as acceptable.
- test -f $(srcdir)/devel/latex/refman.tex
+ test -f $(DEVEL_REFMAN).tmp/latex/refman.tex
-rm -rf $(srcdir)/$(DEVEL_REFMAN)
## FIXME: Moving directories between file systems is not portable.
- mv $(srcdir)/devel $(srcdir)/$(DEVEL_REFMAN)
+ mv $(DEVEL_REFMAN).tmp $(srcdir)/$(DEVEL_REFMAN)
@mv -f $@.tmp $@
$(srcdir)/$(DEVEL_REFMAN): $(srcdir)/devel-refman.stamp
@@ -225,8 +221,8 @@ $(srcdir)/$(DEVEL_REFMAN): $(srcdir)/devel-refman.stamp
# Clean Doxygen products.
maintainer-clean-local:
- -rm -rf $(srcdir)/user $(srcdir)/$(USER_REFMAN)
- -rm -rf $(srcdir)/devel $(srcdir)/$(DEVEL_REFMAN)
+ -rm -rf $(USER_REFMAN).tmp $(srcdir)/$(USER_REFMAN)
+ -rm -rf $(DEVEL_REFMAN).tmp $(srcdir)/$(DEVEL_REFMAN)
## ------------------------- ##
--
1.5.6.5
1
0
last-svn-commit-34-g01ee98f Update the documentation's copyright header.
by Roland Levillain 01 Apr '10
by Roland Levillain 01 Apr '10
01 Apr '10
* mln/core/concept/object.hh: Here.
---
milena/ChangeLog | 6 ++++++
milena/mln/core/concept/object.hh | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 8ca0adf..8c60e0e 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,11 @@
2010-03-08 Roland Levillain <roland(a)lrde.epita.fr>
+ Update the documentation's copyright header.
+
+ * mln/core/concept/object.hh: Here.
+
+2010-03-08 Roland Levillain <roland(a)lrde.epita.fr>
+
Have Doxygen generate its outputs in the build directory.
* doc/Doxyfile.in (OUTPUT_DIRECTORY):
diff --git a/milena/mln/core/concept/object.hh b/milena/mln/core/concept/object.hh
index 74e3c2a..03408db 100644
--- a/milena/mln/core/concept/object.hh
+++ b/milena/mln/core/concept/object.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -107,7 +107,7 @@
<LI> \ref mln::win
\section copyright Copyright and License.
- Copyright (C) 2007, 2008, 2009 EPITA Research and Development (LRDE)
+ Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development (LRDE)
This documentation is part of Olena.
--
1.5.6.5
1
0
last-svn-commit-35-g2d20a62 Have documentation's examples not depend on hard-coded paths.
by Roland Levillain 01 Apr '10
by Roland Levillain 01 Apr '10
01 Apr '10
* doc/tools/data.hh.in: New file.
Use it...
* doc/examples/ima-save.cc:
...here, to avoid hard-coded paths.
* doc/tools/sample_utils.hh: Likewise.
Adjust header guards.
* doc/examples/split/ima-save-1.cc.raw: Regen.
---
milena/ChangeLog | 12 ++++++++++++
milena/doc/examples/ima-save.cc | 7 ++++---
milena/doc/examples/split/ima-save-1.cc.raw | 4 +---
milena/{apps => doc/tools}/data.hh.in | 16 ++++++----------
milena/doc/tools/sample_utils.hh | 15 ++++++++-------
5 files changed, 31 insertions(+), 23 deletions(-)
copy milena/{apps => doc/tools}/data.hh.in (78%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 8c60e0e..39f43ac 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,15 @@
+2010-03-12 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Have documentation's examples not depend on hard-coded paths.
+
+ * doc/tools/data.hh.in: New file.
+ Use it...
+ * doc/examples/ima-save.cc:
+ ...here, to avoid hard-coded paths.
+ * doc/tools/sample_utils.hh: Likewise.
+ Adjust header guards.
+ * doc/examples/split/ima-save-1.cc.raw: Regen.
+
2010-03-08 Roland Levillain <roland(a)lrde.epita.fr>
Update the documentation's copyright header.
diff --git a/milena/doc/examples/ima-save.cc b/milena/doc/examples/ima-save.cc
index 91c8226..b93945b 100644
--- a/milena/doc/examples/ima-save.cc
+++ b/milena/doc/examples/ima-save.cc
@@ -1,6 +1,9 @@
#include <mln/core/image/image2d.hh>
#include <mln/io/pbm/save.hh>
#include <mln/make/image.hh>
+
+#include "doc/tools/data.hh"
+
int main()
{
using namespace mln;
@@ -15,8 +18,6 @@ int main()
image2d<bool> ima = make::image(vals);
// \{
- /* FIXME: Hard-coded paths are bad! Use something like
- milena/tests/data.hh.in instead. */
- io::pbm::save(ima, "figures/ima_save.pbm");
+ io::pbm::save(ima, MLN_DOC_DIR "/figures/ima_save.pbm");
// \}
}
diff --git a/milena/doc/examples/split/ima-save-1.cc.raw b/milena/doc/examples/split/ima-save-1.cc.raw
index 98d029c..7db0408 100644
--- a/milena/doc/examples/split/ima-save-1.cc.raw
+++ b/milena/doc/examples/split/ima-save-1.cc.raw
@@ -1,3 +1 @@
- /* FIXME: Hard-coded paths are bad! Use something like
- milena/tests/data.hh.in instead. */
- io::pbm::save(ima, "figures/ima_save.pbm");
+ io::pbm::save(ima, MLN_DOC_DIR "/figures/ima_save.pbm");
diff --git a/milena/apps/data.hh.in b/milena/doc/tools/data.hh.in
similarity index 78%
copy from milena/apps/data.hh.in
copy to milena/doc/tools/data.hh.in
index 8adb35f..c300521 100644
--- a/milena/apps/data.hh.in
+++ b/milena/doc/tools/data.hh.in
@@ -1,5 +1,4 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -24,18 +23,15 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
-#ifndef APPS_DATA_HH
-# define APPS_DATA_HH
+#ifndef DOC_TOOLS_HH
+# define DOC_TOOLS_HH
# include <string>
/* Macros are evil, but they save us an extra compilation unit here
(as well as additional burden in Makefiles, too.). */
-/// The absolute path to the img directory of Milena.
-# define MLN_IMG_DIR "@abs_top_srcdir@/milena/img"
+/// The absolute path to the doc directory of Milena.
+# define MLN_DOC_DIR "@abs_top_srcdir@/milena/doc"
-/// The absolute path to the apps directory of Milena.
-# define MLN_APPS_DIR "@abs_top_srcdir@/milena/apps/"
-
-#endif // ! APPS_DATA_HH
+#endif // ! DOC_TOOLS_HH
diff --git a/milena/doc/tools/sample_utils.hh b/milena/doc/tools/sample_utils.hh
index 6ef802d..e7e3f81 100644
--- a/milena/doc/tools/sample_utils.hh
+++ b/milena/doc/tools/sample_utils.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Milena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,14 +26,16 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef DOC_TUTORIAL_TOOLS_SAMPLE_UTILS_HH
-# define DOC_TUTORIAL_TOOLS_SAMPLE_UTILS_HH
+#ifndef DOC_TOOLS_SAMPLE_UTILS_HH
+# define DOC_TOOLS_SAMPLE_UTILS_HH
# include <mln/core/image/image2d.hh>
# include <mln/io/pbm/all.hh>
# include <mln/io/pgm/all.hh>
# include <mln/io/ppm/all.hh>
+# include "doc/tools/data.hh"
+
namespace doc
{
@@ -43,9 +46,7 @@ namespace doc
static int file_id = 1;
std::ostringstream os;
- /* FIXME: Hard-coded paths are bad! Use something like
- milena/tests/data.hh.in instead. */
- os << "figures/"
+ os << MLN_DOC_DIR "/figures/"
<< name
<< "-"
<< file_id++
@@ -94,5 +95,5 @@ namespace doc
} // end of namespace doc
-#endif // ! DOC_TUTORIAL_TOOLS_SAMPLE_UTILS_HH
+#endif // ! DOC_TOOLS_SAMPLE_UTILS_HH
--
1.5.6.5
1
0
last-svn-commit-36-g2e0e1ee configure.ac: Configure milena/doc/tools/data.hh.
by Roland Levillain 01 Apr '10
by Roland Levillain 01 Apr '10
01 Apr '10
---
ChangeLog | 4 ++++
configure.ac | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 494243b..add6d8f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-12 Roland Levillain <roland(a)lrde.epita.fr>
+
+ * configure.ac: Configure milena/doc/tools/data.hh.
+
2010-03-08 Roland Levillain <roland(a)lrde.epita.fr>
Require Doxygen 1.5.6 at bootstrapping time.
diff --git a/configure.ac b/configure.ac
index 87730ef..a07bec6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -245,6 +245,10 @@ dnl>>
# Ask for config.h creation.
AC_CONFIG_HEADERS([config.h])
+# Ask for the creation of a milena/doc/tool/data.hh, used to access to
+# data (images) from the documentation.
+AC_CONFIG_FILES([milena/doc/tools/data.hh])
+
# Ask for the Makefile creations.
AC_CONFIG_FILES([
Makefile
--
1.5.6.5
1
0
last-svn-commit-37-g40ff743 Revamp the Makefile machinery in milena/doc/examples/.
by Roland Levillain 01 Apr '10
by Roland Levillain 01 Apr '10
01 Apr '10
* doc/gen-examples-outputs-mk: New script.
* doc/examples/make.mk (PROGRAMS_examples):
Sort and remove duplicates.
(examples_dir): Remove variable.
(accu_right_instanciation_SOURCES)
(borderthickness_SOURCES)
(box2d_bbox_SOURCES)
(domain_display_SOURCES)
(dpoint_1_SOURCES)
(estim_sites_SOURCES)
(extend_SOURCES)
(extension_ignore_SOURCES)
(fill_SOURCES)
(fill_call_1_SOURCES)
(fill_imageif_cfun_SOURCES)
(fill_part_image_SOURCES)
(fill_subdomain_SOURCES)
(fill_subdomain_shorter_SOURCES)
(first_routine_SOURCES)
(forall_piter_SOURCES)
(fun_p2v_1_SOURCES)
(graph_data_SOURCES)
(graph_iter_SOURCES)
(ima2d_1_SOURCES)
(ima2d_2_SOURCES)
(ima2d_3_SOURCES)
(ima2d_4_SOURCES)
(ima2d_5_SOURCES)
(ima2d_6_clone_SOURCES)
(ima2d_7_SOURCES)
(ima2d_rot_SOURCES)
(ima_has_SOURCES)
(ima_save_SOURCES)
(ima_size_SOURCES)
(labeling_compute_SOURCES)
(logical_not_SOURCES)
(mln_var_SOURCES)
(parray_append_SOURCES)
(parray_bbox_SOURCES)
(paste_SOURCES)
(paste_call_1_SOURCES)
(point_1_SOURCES)
(predicate_1_SOURCES)
(win_create_1_SOURCES)
(win_create_2_SOURCES)
(tuto2_first_image_SOURCES)
(tuto3_rw_image_SOURCES)
(tuto4_genericity_and_algorithms_SOURCES)
(tuto3_colorize_SOURCES)
(tuto3_println_SOURCES)
(tuto3_trace_SOURCES)
(tuto4_point2d_SOURCES)
(tuto4_site_set_create_SOURCES):
Adjust.
(data-regen, examples, run-examples)
Remove (phony) targets.
(split-examples, split-outputs):
Likewise.
Superseded by...
($(srcdir)/split-examples.stamp, $(srcdir)/split-outputs.stamp):
...these (new) targets.
(OUTPUTS, EXAMPLES): New variable.
($(DOC_SRCDIR)/examples-outputs.mk): New target.
Include $(DOC_SRCDIR)/examples-outputs.mk.
(MAINTAINERCLEANFILES): Ad $(OUTPUTS).
(diff-data, fix-refdata): Remove these (phony) targets, as they
duplicate services provided by the SCM (Git).
(clean-local, clean-figures): Remove these targets and add their
actions...
* doc/Makefile.am (maintainer-clean-local): ...to this rule.
(EXTRA_DEPS): Remove variable.
Superseded by...
(refman_dependencies): ...this (new) variable.
($(srcdir)/user-refman.stamp)
($(srcdir)/devel-refman.stamp):
Adjust targets' dependencies.
(fig-convert): Remove (phony) target.
Clean up.
* milena/doc/examples-outputs.mk: New (generated file).
---
milena/ChangeLog | 84 ++++
milena/doc/Makefile.am | 61 ++--
milena/doc/examples-outputs.mk | 296 ++++++++++++++
milena/doc/examples/make.mk | 430 +++++++++++---------
.../Makefile.am => doc/gen-examples-outputs-mk} | 29 +-
5 files changed, 677 insertions(+), 223 deletions(-)
create mode 100644 milena/doc/examples-outputs.mk
copy milena/{tests/morpho/reconstruction/by_dilation/Makefile.am => doc/gen-examples-outputs-mk} (60%)
mode change 100644 => 100755
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 39f43ac..6c8a1fe 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,89 @@
2010-03-12 Roland Levillain <roland(a)lrde.epita.fr>
+ Revamp the Makefile machinery in milena/doc/examples/.
+
+ * doc/gen-examples-outputs-mk: New script.
+ * doc/examples/make.mk (PROGRAMS_examples):
+ Sort and remove duplicates.
+ (examples_dir): Remove variable.
+ (accu_right_instanciation_SOURCES)
+ (borderthickness_SOURCES)
+ (box2d_bbox_SOURCES)
+ (domain_display_SOURCES)
+ (dpoint_1_SOURCES)
+ (estim_sites_SOURCES)
+ (extend_SOURCES)
+ (extension_ignore_SOURCES)
+ (fill_SOURCES)
+ (fill_call_1_SOURCES)
+ (fill_imageif_cfun_SOURCES)
+ (fill_part_image_SOURCES)
+ (fill_subdomain_SOURCES)
+ (fill_subdomain_shorter_SOURCES)
+ (first_routine_SOURCES)
+ (forall_piter_SOURCES)
+ (fun_p2v_1_SOURCES)
+ (graph_data_SOURCES)
+ (graph_iter_SOURCES)
+ (ima2d_1_SOURCES)
+ (ima2d_2_SOURCES)
+ (ima2d_3_SOURCES)
+ (ima2d_4_SOURCES)
+ (ima2d_5_SOURCES)
+ (ima2d_6_clone_SOURCES)
+ (ima2d_7_SOURCES)
+ (ima2d_rot_SOURCES)
+ (ima_has_SOURCES)
+ (ima_save_SOURCES)
+ (ima_size_SOURCES)
+ (labeling_compute_SOURCES)
+ (logical_not_SOURCES)
+ (mln_var_SOURCES)
+ (parray_append_SOURCES)
+ (parray_bbox_SOURCES)
+ (paste_SOURCES)
+ (paste_call_1_SOURCES)
+ (point_1_SOURCES)
+ (predicate_1_SOURCES)
+ (win_create_1_SOURCES)
+ (win_create_2_SOURCES)
+ (tuto2_first_image_SOURCES)
+ (tuto3_rw_image_SOURCES)
+ (tuto4_genericity_and_algorithms_SOURCES)
+ (tuto3_colorize_SOURCES)
+ (tuto3_println_SOURCES)
+ (tuto3_trace_SOURCES)
+ (tuto4_point2d_SOURCES)
+ (tuto4_site_set_create_SOURCES):
+ Adjust.
+ (data-regen, examples, run-examples)
+ Remove (phony) targets.
+ (split-examples, split-outputs):
+ Likewise.
+ Superseded by...
+ ($(srcdir)/split-examples.stamp, $(srcdir)/split-outputs.stamp):
+ ...these (new) targets.
+ (OUTPUTS, EXAMPLES): New variable.
+ ($(DOC_SRCDIR)/examples-outputs.mk): New target.
+ Include $(DOC_SRCDIR)/examples-outputs.mk.
+ (MAINTAINERCLEANFILES): Ad $(OUTPUTS).
+ (diff-data, fix-refdata): Remove these (phony) targets, as they
+ duplicate services provided by the SCM (Git).
+ (clean-local, clean-figures): Remove these targets and add their
+ actions...
+ * doc/Makefile.am (maintainer-clean-local): ...to this rule.
+ (EXTRA_DEPS): Remove variable.
+ Superseded by...
+ (refman_dependencies): ...this (new) variable.
+ ($(srcdir)/user-refman.stamp)
+ ($(srcdir)/devel-refman.stamp):
+ Adjust targets' dependencies.
+ (fig-convert): Remove (phony) target.
+ Clean up.
+ * milena/doc/examples-outputs.mk: New (generated file).
+
+2010-03-12 Roland Levillain <roland(a)lrde.epita.fr>
+
Have documentation's examples not depend on hard-coded paths.
* doc/tools/data.hh.in: New file.
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index 49cf5a5..0018406 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -18,6 +18,9 @@
# FIXME: To be overhauled! (See ticket #134).
+# FIXME: Do not use includes if they're used only once: inline them
+# instead.
+
include $(top_srcdir)/milena/doc/doc.mk
DOXYGEN = doxygen
@@ -28,6 +31,7 @@ DOXYFILE = Doxyfile
EXTRA_DIST =
dist_doc_DATA =
CLEANFILES =
+MAINTAINERCLEANFILES =
# FIXME: Simplify all of this. ``Devel'' targets are really
# secondary. And we probably don't need so much target aliases!
@@ -53,18 +57,21 @@ doc-devel-html: tutorial-html ref-guide-html white-paper-html \
ref-doc-devel
-## -------------------------------------------------- ##
-## Shared dependencies on the products of tutorial/. ##
-## -------------------------------------------------- ##
-
-# FIXME: Maintaining dependencies across directories is too
-# complicated. Simplify.
-EXTRA_DEPS = $(srcdir)/tutorial/tutorial.hh $(srcdir)/ref_guide/ref_guide.hh
-
## ----------------------- ##
## Doxygen documentation. ##
## ----------------------- ##
+# FIXME: Check these dependencies.
+# 1. They might be redundant.
+# 2. It'd be better to depend on actual files rather than timestamps
+# correponding to a bunch of files.
+refman_dependencies = \
+ $(srcdir)/split-examples.stamp \
+ $(srcdir)/split-outputs.stamp \
+ $(srcdir)/figures.stamp \
+ $(srcdir)/tutorial/tutorial.hh \
+ $(srcdir)/ref_guide/ref_guide.hh
+
# ----------------------- #
# User reference manual. #
# ----------------------- #
@@ -113,11 +120,11 @@ $(srcdir)/$(USER_REFMAN_PDF): $(srcdir)/$(USER_REFMAN)
cd $(srcdir)/$(USER_REFMAN)/latex && $(MAKE) $(AM_MAKEFLAGS) pdf
cp -f $(srcdir)/$(USER_REFMAN)/latex/refman.pdf $@
-## FIXME: Are dependencies $(srcdir)/figures.stamp $(EXTRA_DEPS) set
-## on the right rule? Does Doxygen make a copy of figures, or does it
-## generate LaTeX inputs relying on the existence of such figures in
-## the initial location? Investigate.
-$(srcdir)/user-refman.stamp: $(srcdir)/$(DOXYFILE).in $(srcdir)/figures.stamp $(EXTRA_DEPS)
+## FIXME: Are dependencies (`$(refman_dependencies)') set on the right
+## rule? Does Doxygen make a copy of figures, or does it generate
+## LaTeX inputs relying on the existence of such figures in the
+## initial location? Investigate.
+$(srcdir)/user-refman.stamp: $(srcdir)/$(DOXYFILE).in $(refman_dependencies)
@rm -f $@.tmp
@touch $@.tmp
-rm -rf $(USER_REFMAN).tmp
@@ -193,11 +200,11 @@ $(srcdir)/$(DEVEL_REFMAN_PDF): $(srcdir)/$(DEVEL_REFMAN)
cd $(srcdir)/$(DEVEL_REFMAN)/latex && $(MAKE) $(AM_MAKEFLAGS) pdf
cp -f $(srcdir)/$(DEVEL_REFMAN)/latex/refman.pdf $@
-## FIXME: Are dependencies $(srcdir)/figures.stamp $(EXTRA_DEPS) set
-## on the right rule? Does Doxygen make a copy of figures, or does it
-## generate LaTeX inputs relying on the existence of such figures in
-## the initial location? Investigate.
-$(srcdir)/devel-refman.stamp: $(srcdir)/$(DOXYFILE).in $(srcdir)/figures.stamp $(EXTRA_DEPS)
+## FIXME: Are dependencies (`$(refman_dependencies)') set on the right
+## rule? Does Doxygen make a copy of figures, or does it generate
+## LaTeX inputs relying on the existence of such figures in the
+## initial location? Investigate.
+$(srcdir)/devel-refman.stamp: $(srcdir)/$(DOXYFILE).in $(refman_dependencies)
@rm -f $@.tmp
@touch $@.tmp
-rm -rf $(DEVEL_REFMAN).tmp
@@ -223,6 +230,12 @@ $(srcdir)/$(DEVEL_REFMAN): $(srcdir)/devel-refman.stamp
maintainer-clean-local:
-rm -rf $(USER_REFMAN).tmp $(srcdir)/$(USER_REFMAN)
-rm -rf $(DEVEL_REFMAN).tmp $(srcdir)/$(DEVEL_REFMAN)
+ -rm -f $(EXAMPLES_BUILDDIR)/*.cc
+# FIXME: If we remove a *directory*, we are supposed to know how to
+# recreate it later. I doubt our rules are all currently able to
+# handle this. See how `make maintainer-clean all' behaves.
+ -rm -rf $(OUTPUTS_BUILDDIR)
+ -rm -rf $(FIGURES_BUILDDIR)
## ------------------------- ##
@@ -257,15 +270,9 @@ include $(srcdir)/ref_guide/ref_guide.mk
## Figures. ##
## --------- ##
-# Make sure the figures are the first files in EXTRA_DIST.
-# Make the 'fake-doc' rule works correctly.
-EXTRA_DIST +=
$(srcdir)/figures/figures.mk: $(srcdir)/headers.stamp
include $(srcdir)/figures/figures.mk
-
-fig-convert: $(srcdir)/figures.stamp
-
EXTRA_DIST += figures.stamp
$(srcdir)/figures.stamp: $(FIGURES_SRCDIR)/*.p*m
rm -f $@.tmp
@@ -288,9 +295,11 @@ $(srcdir)/figures.stamp: $(FIGURES_SRCDIR)/*.p*m
include $(top_srcdir)/milena/doc/examples/make.mk
-# Regen files.
+# Regen Make helpers.
EXTRA_DIST += generate_dist_files.sh headers.stamp
include $(top_srcdir)/build-aux/regen-recursive.mk
+## FIXME: It'd probably be better to separate the rules generating
+## examples/examples.mk, outputs/outputs.mk and figures/figures.mk.
regen-am:
@rm -f $(srcdir)/headers.stamp.tmp
@touch $(srcdir)/headers.stamp.tmp
@@ -369,6 +378,6 @@ EXTRA_DIST += \
tools/split_sample.sh \
tools/todoxygen.sh
-MAINTAINERCLEANFILES = \
+MAINTAINERCLEANFILES += \
Doxyfile_user \
Doxyfile_devel
diff --git a/milena/doc/examples-outputs.mk b/milena/doc/examples-outputs.mk
new file mode 100644
index 0000000..6fdb543
--- /dev/null
+++ b/milena/doc/examples-outputs.mk
@@ -0,0 +1,296 @@
+## Generated by gen-examples-outputs-mk. Do not edit by hand.
+
+$(srcdir)/outputs/accu-right-instanciation.txt: accu-right-instanciation$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/borderthickness.txt: borderthickness$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/box2d-bbox.txt: box2d-bbox$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/domain-display.txt: domain-display$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/dpoint-1.txt: dpoint-1$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/estim-sites.txt: estim-sites$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/extend.txt: extend$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/extension-ignore.txt: extension-ignore$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/fill.txt: fill$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/fill-call-1.txt: fill-call-1$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/fill-imageif-cfun.txt: fill-imageif-cfun$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/fill-part-image.txt: fill-part-image$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/fill-subdomain.txt: fill-subdomain$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/fill-subdomain-shorter.txt: fill-subdomain-shorter$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/first_routine.txt: first_routine$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/forall-piter.txt: forall-piter$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/fun-p2v-1.txt: fun-p2v-1$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/graph-data.txt: graph-data$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/graph-iter.txt: graph-iter$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/ima-has.txt: ima-has$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/ima-save.txt: ima-save$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/ima-size.txt: ima-size$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/ima2d-1.txt: ima2d-1$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/ima2d-2.txt: ima2d-2$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/ima2d-3.txt: ima2d-3$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/ima2d-4.txt: ima2d-4$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/ima2d-5.txt: ima2d-5$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/ima2d-6-clone.txt: ima2d-6-clone$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/ima2d-7.txt: ima2d-7$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/ima2d-rot.txt: ima2d-rot$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/labeling-compute.txt: labeling-compute$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/logical-not.txt: logical-not$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/mln_var.txt: mln_var$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/parray-append.txt: parray-append$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/parray-bbox.txt: parray-bbox$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/paste.txt: paste$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/paste-call-1.txt: paste-call-1$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/point-1.txt: point-1$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/predicate-1.txt: predicate-1$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/win-create-1.txt: win-create-1$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/win-create-2.txt: win-create-2$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/tuto2_first_image.txt: tuto2_first_image$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/tuto3_rw_image.txt: tuto3_rw_image$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/tuto4_genericity_and_algorithms.txt: tuto4_genericity_and_algorithms$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/tuto3_colorize.txt: tuto3_colorize$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/tuto3_println.txt: tuto3_println$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/tuto3_trace.txt: tuto3_trace$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/tuto4_point2d.txt: tuto4_point2d$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/tuto4_site_set_create.txt: tuto4_site_set_create$(EXEEXT)
+ rm -f $@.tmp
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
diff --git a/milena/doc/examples/make.mk b/milena/doc/examples/make.mk
index d83a742..91f21cb 100644
--- a/milena/doc/examples/make.mk
+++ b/milena/doc/examples/make.mk
@@ -15,13 +15,8 @@
#
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
-#
-
-## Process this file through Automake to create Makefile.in.
-examples_dir = $(doc_dir)/examples
-
-PROGRAMS_examples = \
+PROGRAMS_examples = \
accu-right-instanciation \
borderthickness \
box2d-bbox \
@@ -32,10 +27,10 @@ PROGRAMS_examples = \
extension-ignore \
fill \
fill-call-1 \
+ fill-imageif-cfun \
fill-part-image \
fill-subdomain \
fill-subdomain-shorter \
- fill-imageif-cfun \
first_routine \
forall-piter \
fun-p2v-1 \
@@ -52,14 +47,13 @@ PROGRAMS_examples = \
ima2d-6-clone \
ima2d-7 \
ima2d-rot \
- ima-size \
labeling-compute \
logical-not \
mln_var \
+ parray-append \
parray-bbox \
paste \
paste-call-1 \
- parray-append \
point-1 \
predicate-1 \
win-create-1 \
@@ -82,198 +76,262 @@ PROGRAMS_examples += \
tuto4_site_set_create
EXTRA_PROGRAMS = $(PROGRAMS_examples)
-
-# FIXME: Is this really needed?
CLEANFILES += $(PROGRAMS_examples)
-accu_right_instanciation_SOURCES = $(examples_dir)/accu-right-instanciation.cc
-borderthickness_SOURCES = $(examples_dir)/borderthickness.cc
-box2d_bbox_SOURCES = $(examples_dir)/box2d-bbox.cc
-domain_display_SOURCES = $(examples_dir)/domain-display.cc
-dpoint_1_SOURCES = $(examples_dir)/dpoint-1.cc
-estim_sites_SOURCES = $(examples_dir)/estim-sites.cc
-extend_SOURCES = $(examples_dir)/extend.cc
-extension_ignore_SOURCES = $(examples_dir)/extension-ignore.cc
-fill_SOURCES = $(examples_dir)/fill.cc
-fill_call_1_SOURCES = $(examples_dir)/fill-call-1.cc
-fill_part_image_SOURCES = $(examples_dir)/fill-part-image.cc
-fill_subdomain_SOURCES = $(examples_dir)/fill-subdomain.cc
-fill_subdomain_shorter_SOURCES = $(examples_dir)/fill-subdomain-shorter.cc
-fill_imageif_cfun_SOURCES = $(examples_dir)/fill-imageif-cfun.cc
-first_routine_SOURCES = $(examples_dir)/tuto3/first_routine.cc
-forall_piter_SOURCES = $(examples_dir)/forall-piter.cc
-fun_p2v_1_SOURCES = $(examples_dir)/fun-p2v-1.cc
-graph_data_SOURCES = $(examples_dir)/graph-data.cc
-graph_iter_SOURCES = $(examples_dir)/graph-iter.cc
-ima_has_SOURCES = $(examples_dir)/ima-has.cc
-ima_save_SOURCES = $(examples_dir)/ima-save.cc
-ima_size_SOURCES = $(examples_dir)/ima-size.cc
-ima2d_1_SOURCES = $(examples_dir)/ima2d-1.cc
-ima2d_2_SOURCES = $(examples_dir)/ima2d-2.cc
-ima2d_3_SOURCES = $(examples_dir)/ima2d-3.cc
-ima2d_4_SOURCES = $(examples_dir)/ima2d-4.cc
-ima2d_5_SOURCES = $(examples_dir)/ima2d-5.cc
-ima2d_6_clone_SOURCES = $(examples_dir)/ima2d-6-clone.cc
-ima2d_7_SOURCES = $(examples_dir)/ima2d-7.cc
-ima2d_rot_SOURCES = $(examples_dir)/ima2d-rot.cc
-labeling_compute_SOURCES = $(examples_dir)/labeling-compute.cc
-logical_not_SOURCES = $(examples_dir)/logical-not.cc
-mln_var_SOURCES = $(examples_dir)/mln_var.cc
-paste_SOURCES = $(examples_dir)/paste.cc
-paste_call_1_SOURCES = $(examples_dir)/paste-call-1.cc
-parray_append_SOURCES = $(examples_dir)/parray-append.cc
-parray_bbox_SOURCES = $(examples_dir)/parray-bbox.cc
-point_1_SOURCES = $(examples_dir)/point-1.cc
-predicate_1_SOURCES = $(examples_dir)/predicate-1.cc
-win_create_1_SOURCES = $(examples_dir)/win-create-1.cc
-win_create_2_SOURCES = $(examples_dir)/win-create-2.cc
+# FIXME: Careful, this will only work if this file is included by
+# `milena/doc/Makefile.am', since `examples/' is a subdirectory of
+# `milena/doc/'. Anyway, this file is to be eventually inlined in
+# `milena/doc/Makefile.am', so this is not a big deal.
+accu_right_instanciation_SOURCES = examples/accu-right-instanciation.cc
+borderthickness_SOURCES = examples/borderthickness.cc
+box2d_bbox_SOURCES = examples/box2d-bbox.cc
+domain_display_SOURCES = examples/domain-display.cc
+dpoint_1_SOURCES = examples/dpoint-1.cc
+estim_sites_SOURCES = examples/estim-sites.cc
+extend_SOURCES = examples/extend.cc
+extension_ignore_SOURCES = examples/extension-ignore.cc
+fill_SOURCES = examples/fill.cc
+fill_call_1_SOURCES = examples/fill-call-1.cc
+fill_imageif_cfun_SOURCES = examples/fill-imageif-cfun.cc
+fill_part_image_SOURCES = examples/fill-part-image.cc
+fill_subdomain_SOURCES = examples/fill-subdomain.cc
+fill_subdomain_shorter_SOURCES = examples/fill-subdomain-shorter.cc
+first_routine_SOURCES = examples/tuto3/first_routine.cc
+forall_piter_SOURCES = examples/forall-piter.cc
+fun_p2v_1_SOURCES = examples/fun-p2v-1.cc
+graph_data_SOURCES = examples/graph-data.cc
+graph_iter_SOURCES = examples/graph-iter.cc
+ima2d_1_SOURCES = examples/ima2d-1.cc
+ima2d_2_SOURCES = examples/ima2d-2.cc
+ima2d_3_SOURCES = examples/ima2d-3.cc
+ima2d_4_SOURCES = examples/ima2d-4.cc
+ima2d_5_SOURCES = examples/ima2d-5.cc
+ima2d_6_clone_SOURCES = examples/ima2d-6-clone.cc
+ima2d_7_SOURCES = examples/ima2d-7.cc
+ima2d_rot_SOURCES = examples/ima2d-rot.cc
+ima_has_SOURCES = examples/ima-has.cc
+ima_save_SOURCES = examples/ima-save.cc
+ima_size_SOURCES = examples/ima-size.cc
+labeling_compute_SOURCES = examples/labeling-compute.cc
+logical_not_SOURCES = examples/logical-not.cc
+mln_var_SOURCES = examples/mln_var.cc
+parray_append_SOURCES = examples/parray-append.cc
+parray_bbox_SOURCES = examples/parray-bbox.cc
+paste_SOURCES = examples/paste.cc
+paste_call_1_SOURCES = examples/paste-call-1.cc
+point_1_SOURCES = examples/point-1.cc
+predicate_1_SOURCES = examples/predicate-1.cc
+win_create_1_SOURCES = examples/win-create-1.cc
+win_create_2_SOURCES = examples/win-create-2.cc
-tuto2_first_image_SOURCES = $(examples_dir)/tuto2_first_image.cc
-tuto3_rw_image_SOURCES = $(examples_dir)/tuto3_rw_image.cc
-tuto4_genericity_and_algorithms_SOURCES = $(examples_dir)/tuto4_genericity_and_algorithms.cc
+tuto2_first_image_SOURCES = examples/tuto2_first_image.cc
+tuto3_rw_image_SOURCES = examples/tuto3_rw_image.cc
+tuto4_genericity_and_algorithms_SOURCES = examples/tuto4_genericity_and_algorithms.cc
# Tuto 3
-tuto3_colorize_SOURCES = $(examples_dir)/tuto3/colorize.cc
-tuto3_println_SOURCES = $(examples_dir)/tuto3/println.cc
-tuto3_trace_SOURCES = $(examples_dir)/tuto3/trace.cc
+tuto3_colorize_SOURCES = examples/tuto3/colorize.cc
+tuto3_println_SOURCES = examples/tuto3/println.cc
+tuto3_trace_SOURCES = examples/tuto3/trace.cc
# Tuto 4
-tuto4_site_set_create_SOURCES = $(examples_dir)/tuto4/site_set_create.cc
-tuto4_point2d_SOURCES = $(examples_dir)/tuto4/point2d.cc
-
+tuto4_point2d_SOURCES = examples/tuto4/point2d.cc
+tuto4_site_set_create_SOURCES = examples/tuto4/site_set_create.cc
-.PHONY : examples run-examples diff-data fix-refdata \
- split-examples split-outputs
-examples: $(PROGRAMS_examples)
-
-run-examples: examples
- test -d $(top_builddir)/milena/doc/figures \
- || mkdir $(top_builddir)/milena/doc/figures; \
- failcom='exit 1'; \
- list='$(PROGRAMS_examples)'; for bin in $$list; do \
- echo "Running $$bin"; \
- ./$$bin > $(OUTPUTS_SRCDIR)/$$bin.txt || eval $$failcom; \
- done
+# FIXME: Try to avoid the use an extensive list: either use Make's
+# substitution rules or generate it. Actually this list is already
+# generated (see outputs/outputs.mk).
+OUTPUTS = \
+ $(srcdir)/outputs/accu-right-instanciation.txt \
+ $(srcdir)/outputs/borderthickness.txt \
+ $(srcdir)/outputs/box2d-bbox.txt \
+ $(srcdir)/outputs/domain-display.txt \
+ $(srcdir)/outputs/dpoint-1.txt \
+ $(srcdir)/outputs/estim-sites.txt \
+ $(srcdir)/outputs/extend.txt \
+ $(srcdir)/outputs/extension-ignore.txt \
+ $(srcdir)/outputs/fill-call-1.txt \
+ $(srcdir)/outputs/fill-imageif-cfun.txt \
+ $(srcdir)/outputs/fill-part-image.txt \
+ $(srcdir)/outputs/fill-subdomain-shorter.txt \
+ $(srcdir)/outputs/fill-subdomain.txt \
+ $(srcdir)/outputs/fill.txt \
+ $(srcdir)/outputs/first_routine.txt \
+ $(srcdir)/outputs/forall-piter.txt \
+ $(srcdir)/outputs/fun-p2v-1.txt \
+ $(srcdir)/outputs/graph-data.txt \
+ $(srcdir)/outputs/graph-iter.txt \
+ $(srcdir)/outputs/graph-output-1.txt \
+ $(srcdir)/outputs/ima2d-1.txt \
+ $(srcdir)/outputs/ima2d-2.txt \
+ $(srcdir)/outputs/ima2d-3.txt \
+ $(srcdir)/outputs/ima2d-4.txt \
+ $(srcdir)/outputs/ima2d-5.txt \
+ $(srcdir)/outputs/ima2d-6-clone.txt \
+ $(srcdir)/outputs/ima2d-7.txt \
+ $(srcdir)/outputs/ima2d-decl-2.txt \
+ $(srcdir)/outputs/ima2d-display-1.txt \
+ $(srcdir)/outputs/ima2d-display-2.txt \
+ $(srcdir)/outputs/ima2d-display-output-1.txt \
+ $(srcdir)/outputs/ima2d-display-output-2.txt \
+ $(srcdir)/outputs/ima2d-rot.txt \
+ $(srcdir)/outputs/ima-has.txt \
+ $(srcdir)/outputs/ima-save.txt \
+ $(srcdir)/outputs/ima-size.txt \
+ $(srcdir)/outputs/labeling-compute.txt \
+ $(srcdir)/outputs/logical-not.txt \
+ $(srcdir)/outputs/mln_var.txt \
+ $(srcdir)/outputs/parray-append.txt \
+ $(srcdir)/outputs/parray-bbox.txt \
+ $(srcdir)/outputs/parray-display-1.txt \
+ $(srcdir)/outputs/paste-call-1.txt \
+ $(srcdir)/outputs/paste.txt \
+ $(srcdir)/outputs/point-1.txt \
+ $(srcdir)/outputs/predicate-1.txt \
+ $(srcdir)/outputs/tuto2_first_image.txt \
+ $(srcdir)/outputs/tuto3_colorize.txt \
+ $(srcdir)/outputs/tuto3_println.txt \
+ $(srcdir)/outputs/tuto3_rw_image.txt \
+ $(srcdir)/outputs/tuto3_trace.txt \
+ $(srcdir)/outputs/tuto4_genericity_and_algorithms.txt \
+ $(srcdir)/outputs/tuto4_point2d.txt \
+ $(srcdir)/outputs/tuto4_site_set_create.txt \
+ $(srcdir)/outputs/win-create-1-display.txt \
+ $(srcdir)/outputs/win-create-1.txt \
+ $(srcdir)/outputs/win-create-2.txt
-## FIXME: This is wrong. Make is not an imperative language, and this
-## rule probably does not work as expected.
-data-regen: examples run-examples split-examples split-outputs diff-data
+## FIXME: Do not forget to turn the dependency
+## $(srcdir)/examples/make.mk into $(srcdir)/Makefile.am when the
+## former is merged into the latter.
+$(DOC_SRCDIR)/examples-outputs.mk: $(DOC_SRCDIR)/gen-examples-outputs-mk $(srcdir)/examples/make.mk
+ $(DOC_SRCDIR)/gen-examples-outputs-mk $(PROGRAMS_examples) >$@.tmp
+ mv -f $@.tmp $@
+ chmod -w $@
+include $(DOC_SRCDIR)/examples-outputs.mk
+MAINTAINERCLEANFILES += $(OUTPUTS)
-diff-data: run-examples split-examples
- @failcom='exit 1'; \
- has_txt_diff=""; \
- txtlist="$(OUTPUTS_SRCDIR)/*.txt"; for txt in $$txtlist; do \
- echo "Diff `basename $$txt`"; \
- diff $$txt $(OUTPUTS_SRCDIR)/`basename $$txt` >/dev/null 2>&1 \
- || has_txt_diff="$$has_txt_diff `basename $$txt`"; \
- done; \
- has_fig_diff=""; \
- figlist="$(FIGURES_SRCDIR)/*.p*m"; for fig in $$figlist; do \
- echo "Diff `basename $$fig`"; \
- diff $$fig $(FIGURES_SRCDIR)/`basename $$fig` >/dev/null 2>&1 \
- || has_fig_diff="$$has_fig_diff `basename $$fig`"; \
- done; \
- has_split_out_diff=""; \
- split_outlist="$(SPLIT_OUTPUTS_SRCDIR)/*"; for split_out in $$split_outlist; do \
- echo "Diff `basename $$split_out`"; \
- diff $$split_out $(SPLIT_OUTPUTS_SRCDIR)/`basename $$split_out` >/dev/null 2>&1 \
- || has_split_out_diff="$$has_split_out_diff `basename $$split_out`"; \
- done; \
- has_split_ex_diff=""; \
- split_exlist="$(SPLIT_EXAMPLES_SRCDIR)/*"; for split_ex in $$split_exlist; do \
- echo "Diff `basename $$split_ex`"; \
- diff $$split_ex $(SPLIT_EXAMPLES_SRCDIR)/`basename $$split_ex` >/dev/null 2>&1 \
- || has_split_ex_diff="$$has_split_ex_diff `basename $$split_ex`"; \
- done; \
- (test -z "$$has_txt_diff" && test -z "$$has_fig_diff" && \
- test -z "$$has_split_out_diff" && test -z "$$has_split_ex_diff")\
- || (echo "--------"; \
- echo "ERROR: please check if the tutorial needs an update.";\
- echo " The following files differ from their \
-reference or their reference file does not exist:"; \
- echo "--------"; \
- echo "* Outputs:"; \
- echo ""; \
- echo "$$has_txt_diff"; \
- echo ""; \
- echo "--------"; \
- echo "* Figures:"; \
- echo ""; \
- echo "$$has_fig_diff"; \
- echo ""; \
- echo "--------"; \
- echo "* Split outputs:"; \
- echo ""; \
- echo "$$has_split_out_diff"; \
- echo ""; \
- echo "--------"; \
- echo "* Split examples:"; \
- echo ""; \
- echo "$$has_split_ex_diff"; \
- echo ""; \
- echo "--------"; \
- echo "* Please update manually the reference files located in:" \
- echo ""; \
- echo " $(OUTPUTS_SRCDIR)"; \
- echo " $(FIGURES_SRCDIR)"; \
- echo " $(SPLIT_EXAMPLES_SRCDIR)"; \
- echo " $(SPLIT_OUTPUTS_SRCDIR)"; \
- echo ""; \
- echo "* Reference files can updated automatically with 'make fix-refdata'"; \
- echo ""; \
- echo ""; \
- eval $$failcom);
+# FIXME: Warning: $(SPLIT_EXAMPLES_SRCDIR) might not exist. Ensure it
+# exists.
+# FIXME: Try to avoid the use an extensive list: either use Make's
+# substitution rules or generate it.
+EXAMPLES = \
+ $(srcdir)/examples/ima-save.cc \
+ $(srcdir)/examples/accu-right-instanciation.cc \
+ $(srcdir)/examples/borderthickness.cc \
+ $(srcdir)/examples/box2d-bbox.cc \
+ $(srcdir)/examples/domain-display.cc \
+ $(srcdir)/examples/dpoint-1.cc \
+ $(srcdir)/examples/estim-sites.cc \
+ $(srcdir)/examples/extend.cc \
+ $(srcdir)/examples/extension-ignore.cc \
+ $(srcdir)/examples/fill-call-1.cc \
+ $(srcdir)/examples/fill-imageif-cfun.cc \
+ $(srcdir)/examples/fill-part-image.cc \
+ $(srcdir)/examples/fill-subdomain-shorter.cc \
+ $(srcdir)/examples/fill-subdomain.cc \
+ $(srcdir)/examples/fill.cc \
+ $(srcdir)/examples/forall-piter.cc \
+ $(srcdir)/examples/fun-p2v-1.cc \
+ $(srcdir)/examples/graph-data.cc \
+ $(srcdir)/examples/graph-iter.cc \
+ $(srcdir)/examples/ima-has.cc \
+ $(srcdir)/examples/ima-load.cc \
+ $(srcdir)/examples/ima-size.cc \
+ $(srcdir)/examples/ima2d-1.cc \
+ $(srcdir)/examples/ima2d-2.cc \
+ $(srcdir)/examples/ima2d-3.cc \
+ $(srcdir)/examples/ima2d-4.cc \
+ $(srcdir)/examples/ima2d-5.cc \
+ $(srcdir)/examples/ima2d-6-clone.cc \
+ $(srcdir)/examples/ima2d-7.cc \
+ $(srcdir)/examples/ima2d-rot.cc \
+ $(srcdir)/examples/labeling-compute.cc \
+ $(srcdir)/examples/logical-not.cc \
+ $(srcdir)/examples/mln_var.cc \
+ $(srcdir)/examples/parray-append.cc \
+ $(srcdir)/examples/parray-bbox.cc \
+ $(srcdir)/examples/paste-call-1.cc \
+ $(srcdir)/examples/paste.cc \
+ $(srcdir)/examples/point-1.cc \
+ $(srcdir)/examples/predicate-1.cc \
+ $(srcdir)/examples/trash/accu.cc \
+ $(srcdir)/examples/trash/box.cc \
+ $(srcdir)/examples/trash/cpp_issue.cc \
+ $(srcdir)/examples/trash/erosion.cc \
+ $(srcdir)/examples/trash/for_Z.cc \
+ $(srcdir)/examples/trash/graph.cc \
+ $(srcdir)/examples/trash/image2d.cc \
+ $(srcdir)/examples/trash/image_flat.cc \
+ $(srcdir)/examples/trash/image_if.cc \
+ $(srcdir)/examples/trash/image_plain.cc \
+ $(srcdir)/examples/trash/image_safe.cc \
+ $(srcdir)/examples/trash/labeling_algo.cc \
+ $(srcdir)/examples/trash/mk_graph.cc \
+ $(srcdir)/examples/trash/p_array.2.cc \
+ $(srcdir)/examples/trash/p_array.cc \
+ $(srcdir)/examples/trash/p_image.cc \
+ $(srcdir)/examples/trash/p_key.2.cc \
+ $(srcdir)/examples/trash/p_key.cc \
+ $(srcdir)/examples/trash/p_line2d.cc \
+ $(srcdir)/examples/trash/p_mutable_array_of.cc \
+ $(srcdir)/examples/trash/p_queue.cc \
+ $(srcdir)/examples/trash/p_run.cc \
+ $(srcdir)/examples/trash/p_vaccess.cc \
+ $(srcdir)/examples/trash/proxy.cc \
+ $(srcdir)/examples/trash/sub_image.cc \
+ $(srcdir)/examples/trash/sub_image_if.cc \
+ $(srcdir)/examples/trash/tuto_bis.cc \
+ $(srcdir)/examples/trash/tuto_one.cc \
+ $(srcdir)/examples/trash/vec.cc \
+ $(srcdir)/examples/trash/win_multiple.cc \
+ $(srcdir)/examples/trash/window.cc \
+ $(srcdir)/examples/tuto2_first_image.cc \
+ $(srcdir)/examples/tuto3/colorize.cc \
+ $(srcdir)/examples/tuto3/first_routine.cc \
+ $(srcdir)/examples/tuto3/println.cc \
+ $(srcdir)/examples/tuto3/trace.cc \
+ $(srcdir)/examples/tuto3_rw_image.cc \
+ $(srcdir)/examples/tuto4/image.cc \
+ $(srcdir)/examples/tuto4/point2d.cc \
+ $(srcdir)/examples/tuto4/site_set_create.cc \
+ $(srcdir)/examples/tuto4_genericity_and_algorithms.cc \
+ $(srcdir)/examples/win-create-1.cc \
+ $(srcdir)/examples/win-create-2.cc
-fix-refdata:
- @failcom='exit 1'; \
- txtlist="$(OUTPUTS_SRCDIR)/*.txt"; for txt in $$txtlist; do \
- diff $$txt $(OUTPUTS_SRCDIR)/`basename $$txt` >/dev/null 2>&1 \
- || echo "Updating reference file for $$txt"; \
- cp $$txt $(OUTPUTS_SRCDIR); \
- done; \
- figlist="$(FIGURES_SRCDIR)/*.p*m"; for fig in $$figlist; do \
- diff $$fig $(FIGURES_SRCDIR)/`basename $$fig` >/dev/null 2>&1 \
- || echo "Updating reference file for $$fig"; \
- cp $$fig $(FIGURES_SRCDIR); \
- done; \
- split_outlist="$(SPLIT_OUTPUTS_SRCDIR)/*.txt"; for split_out in $$split_outlist; do \
- diff $$split_out $(SPLIT_OUTPUTS_SRCDIR)/`basename $$split_out` >/dev/null 2>&1 \
- || echo "Updating reference file for $$split_out"; \
- cp $$split_out $(SPLIT_OUTPUTS_SRCDIR); \
- done; \
- split_exlist="$(SPLIT_EXAMPLES_SRCDIR)/*.cc"; for split_ex in $$split_exlist; do \
- diff $$split_ex $(SPLIT_EXAMPLES_SRCDIR)/`basename $$split_ex` >/dev/null 2>&1 \
- || echo "Updating reference file for $$split_ex"; \
- cp $$split_ex $(SPLIT_EXAMPLES_SRCDIR); \
- done;
+# FIXME: Place split files in their own directory, e.g.: split
+# `examples/foo.cc' into `examples/split/foo.dir/foo-1.cc',
+# `examples/split/foo.dir/foo-2.cc', etc. It makes removal of these
+# files easier. We probably also nee a stamp file to keep track of
+# dependencies.
-
-split-examples:
- test -d $(SPLIT_EXAMPLES_SRCDIR) || mkdir $(SPLIT_EXAMPLES_SRCDIR)
- @failcom='exit 1'; \
- list=`find $(EXAMPLES_SRCDIR) -type f -name '*.cc'`; for file in $$list; do \
- $(DOC_SRCDIR)/tools/split_sample.sh $$file cc raw $(SPLIT_EXAMPLES_SRCDIR)\
- || eval $$failcom; \
+# FIXME: Loops are bad, as they prevent parallelism. And we prefer
+# data-driven actions anyway. This would imply that we know in
+# advance the list out outputs (here, split examples). Maybe we can
+# infer it from the LaTeX document.
+$(srcdir)/split-examples.stamp: $(EXAMPLES)
+ @rm -f $@.tmp
+ @touch $@.tmp
+ failcom='exit 1'; \
+ for file in $(EXAMPLES); do \
+ $(DOC_SRCDIR)/tools/split_sample.sh \
+ $$file cc raw $(SPLIT_EXAMPLES_SRCDIR) \
+ || eval $$failcom; \
done
+ @mv -f $@.tmp $@
-split-outputs:
- test -d $(SPLIT_OUTPUTS_SRCDIR) || mkdir $(SPLIT_OUTPUTS_SRCDIR)
- @failcom='exit 1'; \
- list='$(OUTPUTS_SRCDIR)/*.txt'; for file in $$list; do \
- $(DOC_SRCDIR)/tools/split_sample.sh $$file txt "" $(SPLIT_OUTPUTS_SRCDIR)\
- || eval $$failcom; \
+# FIXME: Loops are bad, as they prevent parallelism. And we prefer
+# data-driven actions anyway. This would imply that we know in
+# advance the list out outputs (here, split outputs). Maybe we can
+# infer it from the LaTeX document.
+$(srcdir)/split-outputs.stamp: $(OUTPUTS)
+ @rm -f $@.tmp
+ @touch $@.tmp
+ failcom='exit 1'; \
+ for file in $(OUTPUTS); do \
+ $(DOC_SRCDIR)/tools/split_sample.sh \
+ $$file txt "" $(SPLIT_OUTPUTS_SRCDIR) \
+ || eval $$failcom; \
done
-
-## FIXME: Generated products recored in the repository should be
-## listed in MAINTAINERCLEANFILES.
-clean-local: clean-figures
-## rm -Rf $(OUTPUTS_BUILDDIR)
-## rm -f $(EXAMPLES_BUILDDIR)/*.cc
-
-## FIXME: Generated products recored in the repository should be
-## listed in MAINTAINERCLEANFILES.
-clean-figures:
-## rm -Rf $(FIGURES_BUILDDIR)
+ @mv -f $@.tmp $@
diff --git a/milena/tests/morpho/reconstruction/by_dilation/Makefile.am b/milena/doc/gen-examples-outputs-mk
old mode 100644
new mode 100755
similarity index 60%
copy from milena/tests/morpho/reconstruction/by_dilation/Makefile.am
copy to milena/doc/gen-examples-outputs-mk
index e6e8ea3..10692a1
--- a/milena/tests/morpho/reconstruction/by_dilation/Makefile.am
+++ b/milena/doc/gen-examples-outputs-mk
@@ -1,4 +1,6 @@
-# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE).
+#! /bin/sh
+
+# Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE).
#
# This file is part of Olena.
#
@@ -13,20 +15,25 @@
#
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
-#
-
-## Process this file through Automake to create Makefile.in.
-
-include $(top_srcdir)/milena/tests/tests.mk
-
-check_PROGRAMS = \
- union_find
+# To be used from milena/doc/'s source directory.
+me=`basename $0`
-union_find_SOURCES = union_find.cc
+test $# -ne 0 || { echo "usage: $me PROGRAMS..."; exit 1; }
+cat<<EOF
+## Generated by $me. Do not edit by hand.
-TESTS = $(check_PROGRAMS)
+EOF
+for program; do
+cat<<EOF
+\$(srcdir)/outputs/$program.txt: $program\$(EXEEXT)
+ rm -f \$@.tmp
+ ./\$< >\$@.tmp
+ cp -f \$@.tmp \$@
+ rm -f \$@.tmp
+EOF
+done
--
1.5.6.5
1
0