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
12 Mar '10
* doc/Makefile.am: Include $(top_srcdir)/build-aux/tex.mk.
(TEXI2DVI_FLAGS): Append -I $(DOC_SRCDIR), -I $(OUTPUTS_SRCDIR),
-I $(SPLIT_OUTPUTS_SRCDIR), -I $(IMG_SRCDIR) and -I
$(SPLIT_EXAMPLES_SRCDIR).
(technical_TEXINPUTS, tutorial_TEXINPUTS)
(white_paper_TEXINPUTS, ref_guide_TEXINPUTS):
Remove variables.
($(TECHNICAL_PDF), $(TUTORIAL_PDF))
($(WHITE_PAPER_PDF), $(REF_GUIDE_PDF)):
Reduce these rules to a list of extra dependencies and let the
generic tex-to-pdf rule do the job.
($(WHITE_PAPER_HTML)): Adjust rule.
---
milena/ChangeLog | 17 +++++++++++++
milena/doc/Makefile.am | 60 ++++++++++++++++-------------------------------
2 files changed, 38 insertions(+), 39 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 9ae0a19..f973c8e 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,22 @@
2010-03-12 Roland Levillain <roland(a)lrde.epita.fr>
+ Use texi2dvi to produce PDF from LaTeX.
+
+ * doc/Makefile.am: Include $(top_srcdir)/build-aux/tex.mk.
+ (TEXI2DVI_FLAGS): Append -I $(DOC_SRCDIR), -I $(OUTPUTS_SRCDIR),
+ -I $(SPLIT_OUTPUTS_SRCDIR), -I $(IMG_SRCDIR) and -I
+ $(SPLIT_EXAMPLES_SRCDIR).
+ (technical_TEXINPUTS, tutorial_TEXINPUTS)
+ (white_paper_TEXINPUTS, ref_guide_TEXINPUTS):
+ Remove variables.
+ ($(TECHNICAL_PDF), $(TUTORIAL_PDF))
+ ($(WHITE_PAPER_PDF), $(REF_GUIDE_PDF)):
+ Reduce these rules to a list of extra dependencies and let the
+ generic tex-to-pdf rule do the job.
+ ($(WHITE_PAPER_HTML)): Adjust rule.
+
+2010-03-12 Roland Levillain <roland(a)lrde.epita.fr>
+
Merge doc/ Makefile helpers into doc/Makefile.am.
* milena/doc/doc.mk,
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index 5f2b9ba..10c8fef 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -79,6 +79,17 @@ doc-devel-html: tutorial-html ref-guide-html white-paper-html \
ref-doc-devel
+## --------------------- ##
+## LaTeX configuration. ##
+## --------------------- ##
+
+include $(top_srcdir)/build-aux/tex.mk
+
+# FIXME: Check this list.
+TEXI2DVI_FLAGS += \
+ -I $(DOC_SRCDIR) -I $(OUTPUTS_SRCDIR) -I $(SPLIT_OUTPUTS_SRCDIR) \
+ -I $(IMG_SRCDIR) -I $(SPLIT_EXAMPLES_SRCDIR)
+
## ----------------------- ##
## Doxygen documentation. ##
## ----------------------- ##
@@ -266,10 +277,6 @@ maintainer-clean-local:
.PHONY: technical technical-html technical-pdf
-technical_TEXINPUTS ="$(DOC_SRCDIR):$(OUTPUTS_SRCDIR):$(srcdir):\
-$(SPLIT_OUTPUTS_SRCDIR):$(IMG_SRCDIR):$(SPLIT_EXAMPLES_SRCDIR):"
-
-
technical: technical-html technical-pdf
technical_dir = $(doc_dir)/technical
@@ -318,12 +325,8 @@ $(TECHNICAL_HH): $(technical_dir)/technical.tex $(technical_dependencies)
# Final product.
TECHNICAL_PDF = $(technical_dir)/technical.pdf
technical-pdf: $(TECHNICAL_PDF)
-$(TECHNICAL_PDF): $(technical_dir)/technical.tex $(technical_dependencies)
- TEXINPUTS=$(technical_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(technical_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(technical_TEXINPUTS) pdflatex $< \
- test "x$(technical_dir)" != x. \
- && mv -f technical.pdf $(technical_dir)
+# Extra dependencies.
+$(TECHNICAL_PDF): $(technical_dependencies)
dist_doc_DATA += $(TECHNICAL_PDF)
@@ -353,9 +356,6 @@ CLEANFILES += \
.PHONY: tutorial tutorial-html tutorial-pdf
-tutorial_TEXINPUTS = $(DOC_SRCDIR):$(OUTPUTS_SRCDIR):$(IMG_SRCDIR):
-
-
tutorial: tutorial-html tutorial-pdf
tutorial_dir = $(doc_dir)/tutorial
@@ -407,12 +407,8 @@ $(TUTORIAL_HH): $(tutorial_dir)/tutorial.tex $(tutorial_dependencies)
# Final product.
TUTORIAL_PDF = $(tutorial_dir)/tutorial.pdf
tutorial-pdf: $(TUTORIAL_PDF)
-$(TUTORIAL_PDF): $(tutorial_dir)/tutorial.tex $(tutorial_dependencies)
- TEXINPUTS=$(tutorial_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(tutorial_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(tutorial_TEXINPUTS) pdflatex $< \
- test x"$(tutorial_dir)" != x. \
- && mv -f tutorial.pdf $(tutorial_dir)
+# Extra dependencies.
+$(TUTORIAL_PDF): $(tutorial_dependencies)
dist_doc_DATA += $(TUTORIAL_PDF)
@@ -444,8 +440,6 @@ CLEANFILES += \
white_paper_dir = $(doc_dir)/white_paper
-white_paper_TEXINPUTS = $(DOC_SRCDIR):$(white_paper_dir):
-
PNGS = \
$(white_paper_dir)/figures/house.png \
$(white_paper_dir)/figures/house_rag.png \
@@ -487,24 +481,20 @@ white-paper: white-paper-pdf white-paper-html
# dir).
# FIXME: Use texi2dvi/TeX4ht instead of plain hevea.
+# FIXME: Why is WHITE_PAPER_HTML generated in a subdirectory?
WHITE_PAPER_HTML = $(white_paper_dir)/white_paper_html/index.html
white-paper-html: $(WHITE_PAPER_HTML)
$(WHITE_PAPER_HTML): $(white_paper_dir)/white_paper.tex $(EPSS)
test -d $(white_paper_dir)/white_paper_html \
|| mkdir $(white_paper_dir)/white_paper_html
- TEXINPUTS=$(white_paper_TEXINPUTS) hevea -O -fix $< -o $@
+ TEXINPUTS="$(DOC_SRCDIR):$(white_paper_dir):" hevea -O -fix $< -o $@
$(doc_dir)/tools/clearbanner.sh $@
WHITE_PAPER_PDF = $(white_paper_dir)/white_paper.pdf
white-paper-pdf: $(WHITE_PAPER_PDF)
-$(WHITE_PAPER_PDF): $(white_paper_dir)/white_paper.tex $(PNGS)
- TEXINPUTS=$(white_paper_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(white_paper_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(white_paper_TEXINPUTS) pdflatex $< \
- test "x$(white_paper_dir)" != x. \
- && mv -f white_paper.pdf $(white_paper_dir)
-
+# Extra dependencies.
+$(WHITE_PAPER_PDF): $(PNGS)
dist_doc_DATA += \
$(WHITE_PAPER_HTML) \
@@ -532,10 +522,6 @@ clean-local:
.PHONY: ref-guide ref-guide-html ref-guide-pdf
-ref_guide_TEXINPUTS = "$(DOC_SRCDIR):$(OUTPUTS_SRCDIR):\
-$(SPLIT_OUTPUTS_SRCDIR):$(IMG_SRCDIR):$(SPLIT_EXAMPLES_SRCDIR):"
-
-
ref-guide: ref-guide-html ref-guide-pdf
ref_guide_dir = $(doc_dir)/ref_guide
@@ -588,12 +574,8 @@ $(REF_GUIDE_HH): $(ref_guide_dir)/ref_guide.tex $(ref_guide_dependencies)
# Final product.
REF_GUIDE_PDF = $(ref_guide_dir)/ref_guide.pdf
ref-guide-pdf: $(REF_GUIDE_PDF)
-$(REF_GUIDE_PDF): $(ref_guide_dir)/ref_guide.tex $(ref_guide_dependencies)
- TEXINPUTS=$(ref_guide_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(ref_guide_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(ref_guide_TEXINPUTS) pdflatex $< \
- test x"$(ref_guide_dir)" != x. \
- && mv -f ref_guide.pdf $(ref_guide_dir)
+# Extra dependencies.
+$(REF_GUIDE_PDF): $(ref_guide_dependencies)
dist_doc_DATA += $(REF_GUIDE_PDF)
--
1.5.6.5
1
0
last-svn-commit-32-gb370eff Merge doc/ Makefile helpers into doc/Makefile.am.
by Roland Levillain 12 Mar '10
by Roland Levillain 12 Mar '10
12 Mar '10
* milena/doc/doc.mk,
* milena/doc/examples/make.mk,
* milena/doc/ref_guide/ref_guide.mk,
* milena/doc/technical/technical.mk,
* milena/doc/tutorial/tutorial.mk,
* milena/doc/white_paper/white_paper.mk:
Remove and inline these files...
* doc/Makefile.am: ...here.
Do not include $(top_srcdir)/milena/tests/tests.mk.
(AM_CPPFLAGS): Add -I$(top_srcdir)/milena and
-I$(top_builddir)/milena.
($(DOC_SRCDIR)/examples-outputs.mk): Depend on
$(srcdir)/Makefile.am instead of $(srcdir)/examples/make.mk.
---
milena/ChangeLog | 18 +
milena/doc/Makefile.am | 688 ++++++++++++++++++++++++++++++++-
milena/doc/doc.mk | 42 --
milena/doc/examples/make.mk | 337 ----------------
milena/doc/ref_guide/ref_guide.mk | 104 -----
milena/doc/technical/technical.mk | 100 -----
milena/doc/tutorial/tutorial.mk | 103 -----
milena/doc/white_paper/white_paper.mk | 103 -----
8 files changed, 696 insertions(+), 799 deletions(-)
delete mode 100644 milena/doc/doc.mk
delete mode 100644 milena/doc/examples/make.mk
delete mode 100644 milena/doc/ref_guide/ref_guide.mk
delete mode 100644 milena/doc/technical/technical.mk
delete mode 100644 milena/doc/tutorial/tutorial.mk
delete mode 100644 milena/doc/white_paper/white_paper.mk
diff --git a/milena/ChangeLog b/milena/ChangeLog
index dabbddb..9ae0a19 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,23 @@
2010-03-12 Roland Levillain <roland(a)lrde.epita.fr>
+ Merge doc/ Makefile helpers into doc/Makefile.am.
+
+ * milena/doc/doc.mk,
+ * milena/doc/examples/make.mk,
+ * milena/doc/ref_guide/ref_guide.mk,
+ * milena/doc/technical/technical.mk,
+ * milena/doc/tutorial/tutorial.mk,
+ * milena/doc/white_paper/white_paper.mk:
+ Remove and inline these files...
+ * doc/Makefile.am: ...here.
+ Do not include $(top_srcdir)/milena/tests/tests.mk.
+ (AM_CPPFLAGS): Add -I$(top_srcdir)/milena and
+ -I$(top_builddir)/milena.
+ ($(DOC_SRCDIR)/examples-outputs.mk): Depend on
+ $(srcdir)/Makefile.am instead of $(srcdir)/examples/make.mk.
+
+2010-03-12 Roland Levillain <roland(a)lrde.epita.fr>
+
Improve dependencies of some documentation products.
* doc/ref_guide/ref_guide.mk (ref_guide_dependencies):
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index 0018406..5f2b9ba 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -1,3 +1,4 @@
+
# Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
# Laboratory (LRDE).
#
@@ -18,10 +19,31 @@
# 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
+# Look for Milena header in srcdir and for (generated) test headers
+# (like data.hh) in builddir.
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/milena -I$(top_builddir)/milena \
+ -I$(top_srcdir)/milena/doc/tutorial/tools
+
+## FIXME: Upercase variables should be reserved for special names:
+## classical Make variables (e.g. `CXXFLAGS') Automake variables
+## (e.g. `SUBDIRS'), etc.
+##
+## Moreover, do we really need all these variables? See how things
+## evolve during the refurbishing of the build system in doc/.
+DOC_SRCDIR = $(top_srcdir)/milena/doc
+OUTPUTS_SRCDIR = $(DOC_SRCDIR)/outputs
+SPLIT_OUTPUTS_SRCDIR = $(OUTPUTS_SRCDIR)/split
+FIGURES_SRCDIR = $(DOC_SRCDIR)/figures
+EXAMPLES_SRCDIR = $(DOC_SRCDIR)/examples
+SPLIT_EXAMPLES_SRCDIR = $(EXAMPLES_SRCDIR)/split
+IMG_SRCDIR = $(DOC_SRCDIR)/img
+
+# FIXME: Adjust when $(DOC_SRCDIR) is renamed or removed.
+#
+# FIXME: Careful, `doc_dir' is close to `docdir', which is reserved by
+# Automake. Change this name?
+doc_dir = $(DOC_SRCDIR)
DOXYGEN = doxygen
@@ -64,7 +86,7 @@ doc-devel-html: tutorial-html ref-guide-html white-paper-html \
# 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.
+# corresponding to a bunch of files.
refman_dependencies = \
$(srcdir)/split-examples.stamp \
$(srcdir)/split-outputs.stamp \
@@ -242,28 +264,357 @@ maintainer-clean-local:
## Technical Documentation. ##
## ------------------------- ##
-include $(srcdir)/technical/technical.mk
+.PHONY: technical technical-html technical-pdf
+
+technical_TEXINPUTS ="$(DOC_SRCDIR):$(OUTPUTS_SRCDIR):$(srcdir):\
+$(SPLIT_OUTPUTS_SRCDIR):$(IMG_SRCDIR):$(SPLIT_EXAMPLES_SRCDIR):"
+
+
+technical: technical-html technical-pdf
+
+technical_dir = $(doc_dir)/technical
+
+# FIXME: Check these dependencies. And it'd be better to depend on
+# actual files rather than timestamps corresponding to a bunch of
+# files.
+technical_dependencies = $(doc_dir)/figures.stamp
+
+# FIXME: As in milena/doc/Makefile.am, we should probably strip
+# $(srcdir) prefixes from target variables, e.g. instead of:
+#
+# FOO = $(srcdir)/foo.pdf
+# $(FOO): foo.tex bar.tex
+# dist_doc_DATA = $(FOO)
+#
+# we should use:
+#
+# FOO = foo.pdf
+# $(srcdir)/$(FOO): foo.tex bar.tex
+# dist_doc_DATA = $(FOO)
+#
+# since it minimizes installation issues (see milena/doc/Makefile.am
+# and Vaucanson's doc/Makefile.am).
+
+# FIXME: Distributed products should be generated in the source dir.
+# That's actually the case, *but* the current solution is not clean
+# and might break sometimes. The clean approach is to create a
+# temporary directory, try to generate the documentation there, and
+# move its contents to the source dir in case of success. If the
+# product is a directory, also refresh a timestamp (in the source
+# dir).
+
+# Intermediate product for the various doc targets of the parent
+# directory.
+#
+# This is not a bug: TECHNICAL_HH is meant to have a `.hh'
+# extension, since it is later parsed by Doxygen, which complains
+# about `.html' files.
+TECHNICAL_HH = $(technical_dir)/technical.hh
+technical-html: $(TECHNICAL_HH)
+$(TECHNICAL_HH): $(technical_dir)/technical.tex $(technical_dependencies)
+ $(doc_dir)/tools/todoxygen.sh $< $(technical_dir) $(doc_dir)
+
+
+# Final product.
+TECHNICAL_PDF = $(technical_dir)/technical.pdf
+technical-pdf: $(TECHNICAL_PDF)
+$(TECHNICAL_PDF): $(technical_dir)/technical.tex $(technical_dependencies)
+ TEXINPUTS=$(technical_TEXINPUTS) pdflatex $<
+ TEXINPUTS=$(technical_TEXINPUTS) pdflatex $<
+ TEXINPUTS=$(technical_TEXINPUTS) pdflatex $< \
+ test "x$(technical_dir)" != x. \
+ && mv -f technical.pdf $(technical_dir)
+
+dist_doc_DATA += $(TECHNICAL_PDF)
+
+EXTRA_DIST += \
+ $(technical_dir)/technical.tex \
+ $(TECHNICAL_HH)
+
+# FIXME: Remove `tutorial.aux tutorial.toc tutorial.log tutorial.bbl
+# tutorial.out *blg *.lot' when texi2dvi is used.
+#
+# FIXME: Why is $(TUTORIAL_PDF) listed here? It should be
+# automatically cleaned. I'm not sure either about the rest of
+# CLEANFILES.
+CLEANFILES += \
+ technical.aux technical.toc technical.log technical.bbl technical.out \
+ *blg *.lot \
+ $(TECHNICAL_PDF) \
+ *.haux *.hh *.html *.htoc \
+ technical.html \
+ technical.idx \
+ $(TECHNICAL_HH)
## ---------- ##
## Tutorial. ##
## ---------- ##
-include $(srcdir)/tutorial/tutorial.mk
+.PHONY: tutorial tutorial-html tutorial-pdf
+
+tutorial_TEXINPUTS = $(DOC_SRCDIR):$(OUTPUTS_SRCDIR):$(IMG_SRCDIR):
+
+
+tutorial: tutorial-html tutorial-pdf
+
+tutorial_dir = $(doc_dir)/tutorial
+
+# FIXME: Check these dependencies.
+# 1. They might be redundant.
+# 2. It'd be better to depend on actual files rather than timestamps
+# corresponding to a bunch of files.
+tutorial_dependencies = \
+ $(doc_dir)/split-examples.stamp \
+ $(doc_dir)/split-outputs.stamp \
+ $(doc_dir)/figures.stamp
+
+# FIXME: As in milena/doc/Makefile.am, we should probably strip
+# $(srcdir) prefixes from target variables, e.g. instead of:
+#
+# FOO = $(srcdir)/foo.pdf
+# $(FOO): foo.tex bar.tex
+# dist_doc_DATA = $(FOO)
+#
+# we should use:
+#
+# FOO = foo.pdf
+# $(srcdir)/$(FOO): foo.tex bar.tex
+# dist_doc_DATA = $(FOO)
+#
+# since it minimizes installation issues (see milena/doc/Makefile.am
+# and Vaucanson's doc/Makefile.am).
+
+# FIXME: Distributed products should be generated in the source dir.
+# That's actually the case, *but* the current solution is not clean
+# and might break sometimes. The clean approach is to create a
+# temporary directory, try to generate the documentation there, and
+# move its contents to the source dir in case of success. If the
+# product is a directory, also refresh a timestamp (in the source
+# dir).
+
+# 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_dir)/tutorial.hh
+tutorial-html: $(TUTORIAL_HH)
+$(TUTORIAL_HH): $(tutorial_dir)/tutorial.tex $(tutorial_dependencies)
+ $(doc_dir)/tools/todoxygen.sh $< $(tutorial_dir) $(doc_dir)
+
+# Final product.
+TUTORIAL_PDF = $(tutorial_dir)/tutorial.pdf
+tutorial-pdf: $(TUTORIAL_PDF)
+$(TUTORIAL_PDF): $(tutorial_dir)/tutorial.tex $(tutorial_dependencies)
+ TEXINPUTS=$(tutorial_TEXINPUTS) pdflatex $<
+ TEXINPUTS=$(tutorial_TEXINPUTS) pdflatex $<
+ TEXINPUTS=$(tutorial_TEXINPUTS) pdflatex $< \
+ test x"$(tutorial_dir)" != x. \
+ && mv -f tutorial.pdf $(tutorial_dir)
+
+dist_doc_DATA += $(TUTORIAL_PDF)
+
+EXTRA_DIST += \
+ $(tutorial_dir)/tutorial.tex \
+ $(TUTORIAL_HH)
+
+# FIXME: Remove `tutorial.aux tutorial.toc tutorial.log tutorial.bbl
+# tutorial.out *blg *.lot' when texi2dvi is used.
+#
+# FIXME: Why is $(TUTORIAL_PDF) listed here? It should be
+# automatically cleaned. I'm not sure either about the rest of
+# CLEANFILES.
+CLEANFILES += \
+ tutorial.aux tutorial.toc tutorial.log tutorial.bbl tutorial.out \
+ *blg *.lot \
+ $(TUTORIAL_PDF) \
+ *.haux *.hh *.html *.htoc \
+ tutorial.html \
+ tutorial.idx \
+ $(TUTORIAL_HH)
## ------------- ##
## White Paper. ##
## ------------- ##
-include $(srcdir)/white_paper/white_paper.mk
+.PHONY: white-paper white-paper-html white-paper-pdf
+
+white_paper_dir = $(doc_dir)/white_paper
+
+white_paper_TEXINPUTS = $(DOC_SRCDIR):$(white_paper_dir):
+
+PNGS = \
+ $(white_paper_dir)/figures/house.png \
+ $(white_paper_dir)/figures/house_rag.png \
+ $(white_paper_dir)/figures/house_wshed.png \
+ $(white_paper_dir)/figures/house_wshed_mean_colors.png
+
+EPSS = $(PNGS:png=eps)
+
+# FIXME: we want to check if 'figures' exists only once!
+.png.eps:
+ test -d figures || mkdir figures
+ convert $< $@
+
+
+white-paper: white-paper-pdf white-paper-html
+
+# FIXME: As in milena/doc/Makefile.am, we should probably strip
+# $(srcdir) prefixes from target variables, e.g. instead of:
+#
+# FOO = $(srcdir)/foo.pdf
+# $(FOO): foo.tex bar.tex
+# dist_doc_DATA = $(FOO)
+#
+# we should use:
+#
+# FOO = foo.pdf
+# $(srcdir)/$(FOO): foo.tex bar.tex
+# dist_doc_DATA = $(FOO)
+#
+# since it minimizes installation issues (see milena/doc/Makefile.am
+# and Vaucanson's doc/Makefile.am).
+
+# FIXME: Distributed products should be generated in the source dir.
+# That's actually the case, *but* the current solution is not clean
+# and might break sometimes. The clean approach is to create a
+# temporary directory, try to generate the documentation there, and
+# move its contents to the source dir in case of success. If the
+# product is a directory, also refresh a timestamp (in the source
+# dir).
+
+# FIXME: Use texi2dvi/TeX4ht instead of plain hevea.
+WHITE_PAPER_HTML = $(white_paper_dir)/white_paper_html/index.html
+white-paper-html: $(WHITE_PAPER_HTML)
+$(WHITE_PAPER_HTML): $(white_paper_dir)/white_paper.tex $(EPSS)
+ test -d $(white_paper_dir)/white_paper_html \
+ || mkdir $(white_paper_dir)/white_paper_html
+ TEXINPUTS=$(white_paper_TEXINPUTS) hevea -O -fix $< -o $@
+ $(doc_dir)/tools/clearbanner.sh $@
+
+
+WHITE_PAPER_PDF = $(white_paper_dir)/white_paper.pdf
+white-paper-pdf: $(WHITE_PAPER_PDF)
+$(WHITE_PAPER_PDF): $(white_paper_dir)/white_paper.tex $(PNGS)
+ TEXINPUTS=$(white_paper_TEXINPUTS) pdflatex $<
+ TEXINPUTS=$(white_paper_TEXINPUTS) pdflatex $<
+ TEXINPUTS=$(white_paper_TEXINPUTS) pdflatex $< \
+ test "x$(white_paper_dir)" != x. \
+ && mv -f white_paper.pdf $(white_paper_dir)
+
+
+dist_doc_DATA += \
+ $(WHITE_PAPER_HTML) \
+ $(WHITE_PAPER_PDF)
+
+EXTRA_DIST += \
+ $(white_paper_dir)/white_paper.tex \
+ $(PNGS) \
+ $(EPSS)
+
+# FIXME: Remove unnecessary patterns.
+CLEANFILES += \
+ white_paper_image.* \
+ white_paper.pdf \
+ *.log *.idx *.out *.aux
+
+# FIXME: Likewise.
+clean-local:
+ -rm -rf white_paper_html figures
## ----------------- ##
## Reference Guide. ##
## ----------------- ##
-include $(srcdir)/ref_guide/ref_guide.mk
+.PHONY: ref-guide ref-guide-html ref-guide-pdf
+
+ref_guide_TEXINPUTS = "$(DOC_SRCDIR):$(OUTPUTS_SRCDIR):\
+$(SPLIT_OUTPUTS_SRCDIR):$(IMG_SRCDIR):$(SPLIT_EXAMPLES_SRCDIR):"
+
+
+ref-guide: ref-guide-html ref-guide-pdf
+
+ref_guide_dir = $(doc_dir)/ref_guide
+
+# FIXME: Check these dependencies.
+# 1. They might be redundant.
+# 2. It'd be better to depend on actual files rather than timestamps
+# corresponding to a bunch of files.
+ref_guide_dependencies = \
+ $(doc_dir)/split-examples.stamp \
+ $(doc_dir)/split-outputs.stamp \
+ $(doc_dir)/figures.stamp
+
+# FIXME: As in milena/doc/Makefile.am, we should probably strip
+# $(srcdir) prefixes from target variables, e.g. instead of:
+#
+# FOO = $(srcdir)/foo.pdf
+# $(FOO): foo.tex bar.tex
+# dist_doc_DATA = $(FOO)
+#
+# we should use:
+#
+# FOO = foo.pdf
+# $(srcdir)/$(FOO): foo.tex bar.tex
+# dist_doc_DATA = $(FOO)
+#
+# since it minimizes installation issues (see milena/doc/Makefile.am
+# and Vaucanson's doc/Makefile.am).
+
+# FIXME: Distributed products should be generated in the source dir.
+# That's actually the case, *but* the current solution is not clean
+# and might break sometimes. The clean approach is to create a
+# temporary directory, try to generate the documentation there, and
+# move its contents to the source dir in case of success. If the
+# product is a directory, also refresh a timestamp (in the source
+# dir).
+
+# 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_dir)/ref_guide.hh
+ref-guide-html: $(REF_GUIDE_HH)
+$(REF_GUIDE_HH): $(ref_guide_dir)/ref_guide.tex $(ref_guide_dependencies)
+ $(doc_dir)/tools/todoxygen.sh $< $(ref_guide_dir) $(doc_dir)
+
+
+# Final product.
+REF_GUIDE_PDF = $(ref_guide_dir)/ref_guide.pdf
+ref-guide-pdf: $(REF_GUIDE_PDF)
+$(REF_GUIDE_PDF): $(ref_guide_dir)/ref_guide.tex $(ref_guide_dependencies)
+ TEXINPUTS=$(ref_guide_TEXINPUTS) pdflatex $<
+ TEXINPUTS=$(ref_guide_TEXINPUTS) pdflatex $<
+ TEXINPUTS=$(ref_guide_TEXINPUTS) pdflatex $< \
+ test x"$(ref_guide_dir)" != x. \
+ && mv -f ref_guide.pdf $(ref_guide_dir)
+
+dist_doc_DATA += $(REF_GUIDE_PDF)
+
+EXTRA_DIST += \
+ $(ref_guide_dir)/ref_guide.tex \
+ $(REF_GUIDE_HH)
+
+# FIXME: Remove `ref_guide.aux ref_guide.toc ref_guide.log
+# ref_guide.bbl ref_guide.out *blg *.lot' when texi2dvi is used.
+#
+# FIXME: Why is $(REF_GUIDE_PDF) listed here? It should be
+# automatically cleaned. I'm not sure either about the rest of
+# CLEANFILES.
+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.idx \
+ $(REF_GUIDE_HH)
## --------- ##
@@ -293,7 +644,323 @@ $(srcdir)/figures.stamp: $(FIGURES_SRCDIR)/*.p*m
## Examples. ##
## ---------- ##
-include $(top_srcdir)/milena/doc/examples/make.mk
+PROGRAMS_examples = \
+ accu-right-instanciation \
+ borderthickness \
+ box2d-bbox \
+ domain-display \
+ dpoint-1 \
+ estim-sites \
+ extend \
+ extension-ignore \
+ fill \
+ fill-call-1 \
+ fill-imageif-cfun \
+ fill-part-image \
+ fill-subdomain \
+ fill-subdomain-shorter \
+ first_routine \
+ forall-piter \
+ fun-p2v-1 \
+ graph-data \
+ graph-iter \
+ ima-has \
+ ima-save \
+ ima-size \
+ ima2d-1 \
+ ima2d-2 \
+ ima2d-3 \
+ ima2d-4 \
+ ima2d-5 \
+ ima2d-6-clone \
+ ima2d-7 \
+ ima2d-rot \
+ labeling-compute \
+ logical-not \
+ mln_var \
+ parray-append \
+ parray-bbox \
+ paste \
+ paste-call-1 \
+ point-1 \
+ predicate-1 \
+ win-create-1 \
+ win-create-2
+
+PROGRAMS_examples += \
+ tuto2_first_image \
+ tuto3_rw_image \
+ tuto4_genericity_and_algorithms
+
+# Tuto3
+PROGRAMS_examples += \
+ tuto3_colorize \
+ tuto3_println \
+ tuto3_trace
+
+# Tuto4
+PROGRAMS_examples += \
+ tuto4_point2d \
+ tuto4_site_set_create
+
+EXTRA_PROGRAMS = $(PROGRAMS_examples)
+CLEANFILES += $(PROGRAMS_examples)
+
+# 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/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/tuto3/colorize.cc
+tuto3_println_SOURCES = examples/tuto3/println.cc
+tuto3_trace_SOURCES = examples/tuto3/trace.cc
+
+# Tuto 4
+tuto4_point2d_SOURCES = examples/tuto4/point2d.cc
+tuto4_site_set_create_SOURCES = examples/tuto4/site_set_create.cc
+
+
+# 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
+
+$(DOC_SRCDIR)/examples-outputs.mk: $(DOC_SRCDIR)/gen-examples-outputs-mk $(srcdir)/Makefile.am
+ $(DOC_SRCDIR)/gen-examples-outputs-mk $(PROGRAMS_examples) >$@.tmp
+ mv -f $@.tmp $@
+ chmod -w $@
+include $(DOC_SRCDIR)/examples-outputs.mk
+
+MAINTAINERCLEANFILES += $(OUTPUTS)
+
+# 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
+
+# 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.
+
+# 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 $@
+
+# 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
+ @mv -f $@.tmp $@
+
# Regen Make helpers.
EXTRA_DIST += generate_dist_files.sh headers.stamp
@@ -308,6 +975,7 @@ regen-am:
./generate_dist_files.sh outputs txt && \
./generate_dist_files.sh examples cc.raw
@mv -f $(srcdir)/headers.stamp.tmp $(srcdir)/headers.stamp
+## FIXME: Regen examples-outputs.mk as well?
$(srcdir)/examples/examples.mk: $(srcdir)/headers.stamp
$(srcdir)/outputs/outputs.mk: $(srcdir)/headers.stamp
diff --git a/milena/doc/doc.mk b/milena/doc/doc.mk
deleted file mode 100644
index 161d893..0000000
--- a/milena/doc/doc.mk
+++ /dev/null
@@ -1,42 +0,0 @@
-# -*- Automake -*-
-
-# Copyright (C) 2008, 2009, 2010 EPITA Research and Development Laboratory
-# (LRDE).
-#
-# This file is part of Olena.
-#
-# Olena is free software: you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation, version 2 of the License.
-#
-# Olena is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Olena. If not, see <http://www.gnu.org/licenses/>.
-
-include $(top_srcdir)/milena/tests/tests.mk
-
-AM_CPPFLAGS += -I$(top_srcdir)/milena/doc/tutorial/tools
-
-## FIXME: Upercase variables should be reserved for special names:
-## classical Make variables (e.g. `CXXFLAGS') Automake variables
-## (e.g. `SUBDIRS'), etc.
-##
-## Moreover, do we really need all these variables? See how things
-## evolve during the refurbishing of the build system in doc/.
-DOC_SRCDIR = $(top_srcdir)/milena/doc
-OUTPUTS_SRCDIR = $(DOC_SRCDIR)/outputs
-SPLIT_OUTPUTS_SRCDIR = $(OUTPUTS_SRCDIR)/split
-FIGURES_SRCDIR = $(DOC_SRCDIR)/figures
-EXAMPLES_SRCDIR = $(DOC_SRCDIR)/examples
-SPLIT_EXAMPLES_SRCDIR = $(EXAMPLES_SRCDIR)/split
-IMG_SRCDIR = $(DOC_SRCDIR)/img
-
-# FIXME: Adjust when $(DOC_SRCDIR) is renamed or removed.
-#
-# FIXME: Careful, `doc_dir' is close to `docdir', which is reserved by
-# Automake. Change this name?
-doc_dir = $(DOC_SRCDIR)
diff --git a/milena/doc/examples/make.mk b/milena/doc/examples/make.mk
deleted file mode 100644
index 91f21cb..0000000
--- a/milena/doc/examples/make.mk
+++ /dev/null
@@ -1,337 +0,0 @@
-# -*- Automake -*-
-
-# Copyright (C) 2009, 2010 EPITA Research and Development Laboratory (LRDE).
-#
-# This file is part of Olena.
-#
-# Olena is free software: you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation, version 2 of the License.
-#
-# Olena is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Olena. If not, see <http://www.gnu.org/licenses/>.
-
-PROGRAMS_examples = \
- accu-right-instanciation \
- borderthickness \
- box2d-bbox \
- domain-display \
- dpoint-1 \
- estim-sites \
- extend \
- extension-ignore \
- fill \
- fill-call-1 \
- fill-imageif-cfun \
- fill-part-image \
- fill-subdomain \
- fill-subdomain-shorter \
- first_routine \
- forall-piter \
- fun-p2v-1 \
- graph-data \
- graph-iter \
- ima-has \
- ima-save \
- ima-size \
- ima2d-1 \
- ima2d-2 \
- ima2d-3 \
- ima2d-4 \
- ima2d-5 \
- ima2d-6-clone \
- ima2d-7 \
- ima2d-rot \
- labeling-compute \
- logical-not \
- mln_var \
- parray-append \
- parray-bbox \
- paste \
- paste-call-1 \
- point-1 \
- predicate-1 \
- win-create-1 \
- win-create-2
-
-PROGRAMS_examples += \
- tuto2_first_image \
- tuto3_rw_image \
- tuto4_genericity_and_algorithms
-
-# Tuto3
-PROGRAMS_examples += \
- tuto3_colorize \
- tuto3_println \
- tuto3_trace
-
-# Tuto4
-PROGRAMS_examples += \
- tuto4_point2d \
- tuto4_site_set_create
-
-EXTRA_PROGRAMS = $(PROGRAMS_examples)
-CLEANFILES += $(PROGRAMS_examples)
-
-# 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/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/tuto3/colorize.cc
-tuto3_println_SOURCES = examples/tuto3/println.cc
-tuto3_trace_SOURCES = examples/tuto3/trace.cc
-
-# Tuto 4
-tuto4_point2d_SOURCES = examples/tuto4/point2d.cc
-tuto4_site_set_create_SOURCES = examples/tuto4/site_set_create.cc
-
-
-# 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: 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)
-
-# 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
-
-# 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.
-
-# 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 $@
-
-# 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
- @mv -f $@.tmp $@
diff --git a/milena/doc/ref_guide/ref_guide.mk b/milena/doc/ref_guide/ref_guide.mk
deleted file mode 100644
index d776b2f..0000000
--- a/milena/doc/ref_guide/ref_guide.mk
+++ /dev/null
@@ -1,104 +0,0 @@
-# -*- Automake -*-
-
-# Copyright (C) 2009, 2010 EPITA Research and Development Laboratory (LRDE).
-#
-# This file is part of Olena.
-#
-# Olena is free software: you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation, version 2 of the License.
-#
-# Olena is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Olena. If not, see <http://www.gnu.org/licenses/>.
-#
-
-.PHONY: ref-guide ref-guide-html ref-guide-pdf
-
-ref_guide_TEXINPUTS = "$(DOC_SRCDIR):$(OUTPUTS_SRCDIR):\
-$(SPLIT_OUTPUTS_SRCDIR):$(IMG_SRCDIR):$(SPLIT_EXAMPLES_SRCDIR):"
-
-
-ref-guide: ref-guide-html ref-guide-pdf
-
-ref_guide_dir = $(doc_dir)/ref_guide
-
-# 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.
-ref_guide_dependencies = \
- $(doc_dir)/split-examples.stamp \
- $(doc_dir)/split-outputs.stamp \
- $(doc_dir)/figures.stamp
-
-# FIXME: As in milena/doc/Makefile.am, we should probably strip
-# $(srcdir) prefixes from target variables, e.g. instead of:
-#
-# FOO = $(srcdir)/foo.pdf
-# $(FOO): foo.tex bar.tex
-# dist_doc_DATA = $(FOO)
-#
-# we should use:
-#
-# FOO = foo.pdf
-# $(srcdir)/$(FOO): foo.tex bar.tex
-# dist_doc_DATA = $(FOO)
-#
-# since it minimizes installation issues (see milena/doc/Makefile.am
-# and Vaucanson's doc/Makefile.am).
-
-# FIXME: Distributed products should be generated in the source dir.
-# That's actually the case, *but* the current solution is not clean
-# and might break sometimes. The clean approach is to create a
-# temporary directory, try to generate the documentation there, and
-# move its contents to the source dir in case of success. If the
-# product is a directory, also refresh a timestamp (in the source
-# dir).
-
-# 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_dir)/ref_guide.hh
-ref-guide-html: $(REF_GUIDE_HH)
-$(REF_GUIDE_HH): $(ref_guide_dir)/ref_guide.tex $(ref_guide_dependencies)
- $(doc_dir)/tools/todoxygen.sh $< $(ref_guide_dir) $(doc_dir)
-
-
-# Final product.
-REF_GUIDE_PDF = $(ref_guide_dir)/ref_guide.pdf
-ref-guide-pdf: $(REF_GUIDE_PDF)
-$(REF_GUIDE_PDF): $(ref_guide_dir)/ref_guide.tex $(ref_guide_dependencies)
- TEXINPUTS=$(ref_guide_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(ref_guide_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(ref_guide_TEXINPUTS) pdflatex $< \
- test x"$(ref_guide_dir)" != x. \
- && mv -f ref_guide.pdf $(ref_guide_dir)
-
-dist_doc_DATA += $(REF_GUIDE_PDF)
-
-EXTRA_DIST += \
- $(ref_guide_dir)/ref_guide.tex \
- $(REF_GUIDE_HH)
-
-# FIXME: Remove `ref_guide.aux ref_guide.toc ref_guide.log
-# ref_guide.bbl ref_guide.out *blg *.lot' when texi2dvi is used.
-#
-# FIXME: Why is $(REF_GUIDE_PDF) listed here? It should be
-# automatically cleaned. I'm not sure either about the rest of
-# CLEANFILES.
-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.idx \
- $(REF_GUIDE_HH)
diff --git a/milena/doc/technical/technical.mk b/milena/doc/technical/technical.mk
deleted file mode 100644
index 8c5ccea..0000000
--- a/milena/doc/technical/technical.mk
+++ /dev/null
@@ -1,100 +0,0 @@
-# -*- Automake -*-
-
-# Copyright (C) 2009, 2010 EPITA Research and Development Laboratory (LRDE).
-#
-# This file is part of Olena.
-#
-# Olena is free software: you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation, version 2 of the License.
-#
-# Olena is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Olena. If not, see <http://www.gnu.org/licenses/>.
-#
-
-.PHONY: technical technical-html technical-pdf
-
-technical_TEXINPUTS ="$(DOC_SRCDIR):$(OUTPUTS_SRCDIR):$(srcdir):\
-$(SPLIT_OUTPUTS_SRCDIR):$(IMG_SRCDIR):$(SPLIT_EXAMPLES_SRCDIR):"
-
-
-technical: technical-html technical-pdf
-
-technical_dir = $(doc_dir)/technical
-
-# FIXME: Check these dependencies. And it'd be better to depend on
-# actual files rather than timestamps correponding to a bunch of
-# files.
-technical_dependencies = $(doc_dir)/figures.stamp
-
-# FIXME: As in milena/doc/Makefile.am, we should probably strip
-# $(srcdir) prefixes from target variables, e.g. instead of:
-#
-# FOO = $(srcdir)/foo.pdf
-# $(FOO): foo.tex bar.tex
-# dist_doc_DATA = $(FOO)
-#
-# we should use:
-#
-# FOO = foo.pdf
-# $(srcdir)/$(FOO): foo.tex bar.tex
-# dist_doc_DATA = $(FOO)
-#
-# since it minimizes installation issues (see milena/doc/Makefile.am
-# and Vaucanson's doc/Makefile.am).
-
-# FIXME: Distributed products should be generated in the source dir.
-# That's actually the case, *but* the current solution is not clean
-# and might break sometimes. The clean approach is to create a
-# temporary directory, try to generate the documentation there, and
-# move its contents to the source dir in case of success. If the
-# product is a directory, also refresh a timestamp (in the source
-# dir).
-
-# Intermediate product for the various doc targets of the parent
-# directory.
-#
-# This is not a bug: TECHNICAL_HH is meant to have a `.hh'
-# extension, since it is later parsed by Doxygen, which complains
-# about `.html' files.
-TECHNICAL_HH = $(technical_dir)/technical.hh
-technical-html: $(TECHNICAL_HH)
-$(TECHNICAL_HH): $(technical_dir)/technical.tex $(technical_dependencies)
- $(doc_dir)/tools/todoxygen.sh $< $(technical_dir) $(doc_dir)
-
-
-# Final product.
-TECHNICAL_PDF = $(technical_dir)/technical.pdf
-technical-pdf: $(TECHNICAL_PDF)
-$(TECHNICAL_PDF): $(technical_dir)/technical.tex $(technical_dependencies)
- TEXINPUTS=$(technical_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(technical_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(technical_TEXINPUTS) pdflatex $< \
- test "x$(technical_dir)" != x. \
- && mv -f technical.pdf $(technical_dir)
-
-dist_doc_DATA += $(TECHNICAL_PDF)
-
-EXTRA_DIST += \
- $(technical_dir)/technical.tex \
- $(TECHNICAL_HH)
-
-# FIXME: Remove `tutorial.aux tutorial.toc tutorial.log tutorial.bbl
-# tutorial.out *blg *.lot' when texi2dvi is used.
-#
-# FIXME: Why is $(TUTORIAL_PDF) listed here? It should be
-# automatically cleaned. I'm not sure either about the rest of
-# CLEANFILES.
-CLEANFILES += \
- technical.aux technical.toc technical.log technical.bbl technical.out \
- *blg *.lot \
- $(TECHNICAL_PDF) \
- *.haux *.hh *.html *.htoc \
- technical.html \
- technical.idx \
- $(TECHNICAL_HH)
diff --git a/milena/doc/tutorial/tutorial.mk b/milena/doc/tutorial/tutorial.mk
deleted file mode 100644
index 7f65365..0000000
--- a/milena/doc/tutorial/tutorial.mk
+++ /dev/null
@@ -1,103 +0,0 @@
-# -*- Automake -*-
-
-# Copyright (C) 2008, 2009, 2010 EPITA Research and Development
-# Laboratory (LRDE).
-#
-# This file is part of Olena.
-#
-# Olena is free software: you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation, version 2 of the License.
-#
-# Olena is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Olena. If not, see <http://www.gnu.org/licenses/>.
-#
-
-.PHONY: tutorial tutorial-html tutorial-pdf
-
-tutorial_TEXINPUTS = $(DOC_SRCDIR):$(OUTPUTS_SRCDIR):$(IMG_SRCDIR):
-
-
-tutorial: tutorial-html tutorial-pdf
-
-tutorial_dir = $(doc_dir)/tutorial
-
-# 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.
-tutorial_dependencies = \
- $(doc_dir)/split-examples.stamp \
- $(doc_dir)/split-outputs.stamp \
- $(doc_dir)/figures.stamp
-
-# FIXME: As in milena/doc/Makefile.am, we should probably strip
-# $(srcdir) prefixes from target variables, e.g. instead of:
-#
-# FOO = $(srcdir)/foo.pdf
-# $(FOO): foo.tex bar.tex
-# dist_doc_DATA = $(FOO)
-#
-# we should use:
-#
-# FOO = foo.pdf
-# $(srcdir)/$(FOO): foo.tex bar.tex
-# dist_doc_DATA = $(FOO)
-#
-# since it minimizes installation issues (see milena/doc/Makefile.am
-# and Vaucanson's doc/Makefile.am).
-
-# FIXME: Distributed products should be generated in the source dir.
-# That's actually the case, *but* the current solution is not clean
-# and might break sometimes. The clean approach is to create a
-# temporary directory, try to generate the documentation there, and
-# move its contents to the source dir in case of success. If the
-# product is a directory, also refresh a timestamp (in the source
-# dir).
-
-# 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_dir)/tutorial.hh
-tutorial-html: $(TUTORIAL_HH)
-$(TUTORIAL_HH): $(tutorial_dir)/tutorial.tex $(tutorial_dependencies)
- $(doc_dir)/tools/todoxygen.sh $< $(tutorial_dir) $(doc_dir)
-
-# Final product.
-TUTORIAL_PDF = $(tutorial_dir)/tutorial.pdf
-tutorial-pdf: $(TUTORIAL_PDF)
-$(TUTORIAL_PDF): $(tutorial_dir)/tutorial.tex $(tutorial_dependencies)
- TEXINPUTS=$(tutorial_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(tutorial_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(tutorial_TEXINPUTS) pdflatex $< \
- test x"$(tutorial_dir)" != x. \
- && mv -f tutorial.pdf $(tutorial_dir)
-
-dist_doc_DATA += $(TUTORIAL_PDF)
-
-EXTRA_DIST += \
- $(tutorial_dir)/tutorial.tex \
- $(TUTORIAL_HH)
-
-# FIXME: Remove `tutorial.aux tutorial.toc tutorial.log tutorial.bbl
-# tutorial.out *blg *.lot' when texi2dvi is used.
-#
-# FIXME: Why is $(TUTORIAL_PDF) listed here? It should be
-# automatically cleaned. I'm not sure either about the rest of
-# CLEANFILES.
-CLEANFILES += \
- tutorial.aux tutorial.toc tutorial.log tutorial.bbl tutorial.out \
- *blg *.lot \
- $(TUTORIAL_PDF) \
- *.haux *.hh *.html *.htoc \
- tutorial.html \
- tutorial.idx \
- $(TUTORIAL_HH)
diff --git a/milena/doc/white_paper/white_paper.mk b/milena/doc/white_paper/white_paper.mk
deleted file mode 100644
index 0b75c44..0000000
--- a/milena/doc/white_paper/white_paper.mk
+++ /dev/null
@@ -1,103 +0,0 @@
-# -*- Automake -*-
-
-# Copyright (C) 2009, 2010 EPITA Research and Development Laboratory (LRDE).
-#
-# This file is part of Olena.
-#
-# Olena is free software: you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation, version 2 of the License.
-#
-# Olena is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Olena. If not, see <http://www.gnu.org/licenses/>.
-#
-
-.PHONY: white-paper white-paper-html white-paper-pdf
-
-white_paper_dir = $(doc_dir)/white_paper
-
-white_paper_TEXINPUTS = $(DOC_SRCDIR):$(white_paper_dir):
-
-PNGS = \
- $(white_paper_dir)/figures/house.png \
- $(white_paper_dir)/figures/house_rag.png \
- $(white_paper_dir)/figures/house_wshed.png \
- $(white_paper_dir)/figures/house_wshed_mean_colors.png
-
-EPSS = $(PNGS:png=eps)
-
-# FIXME: we want to check if 'figures' exists only once!
-.png.eps:
- test -d figures || mkdir figures
- convert $< $@
-
-
-white-paper: white-paper-pdf white-paper-html
-
-# FIXME: As in milena/doc/Makefile.am, we should probably strip
-# $(srcdir) prefixes from target variables, e.g. instead of:
-#
-# FOO = $(srcdir)/foo.pdf
-# $(FOO): foo.tex bar.tex
-# dist_doc_DATA = $(FOO)
-#
-# we should use:
-#
-# FOO = foo.pdf
-# $(srcdir)/$(FOO): foo.tex bar.tex
-# dist_doc_DATA = $(FOO)
-#
-# since it minimizes installation issues (see milena/doc/Makefile.am
-# and Vaucanson's doc/Makefile.am).
-
-# FIXME: Distributed products should be generated in the source dir.
-# That's actually the case, *but* the current solution is not clean
-# and might break sometimes. The clean approach is to create a
-# temporary directory, try to generate the documentation there, and
-# move its contents to the source dir in case of success. If the
-# product is a directory, also refresh a timestamp (in the source
-# dir).
-
-# FIXME: Use texi2dvi/TeX4ht instead of plain hevea.
-WHITE_PAPER_HTML = $(white_paper_dir)/white_paper_html/index.html
-white-paper-html: $(WHITE_PAPER_HTML)
-$(WHITE_PAPER_HTML): $(white_paper_dir)/white_paper.tex $(EPSS)
- test -d $(white_paper_dir)/white_paper_html \
- || mkdir $(white_paper_dir)/white_paper_html
- TEXINPUTS=$(white_paper_TEXINPUTS) hevea -O -fix $< -o $@
- $(doc_dir)/tools/clearbanner.sh $@
-
-
-WHITE_PAPER_PDF = $(white_paper_dir)/white_paper.pdf
-white-paper-pdf: $(WHITE_PAPER_PDF)
-$(WHITE_PAPER_PDF): $(white_paper_dir)/white_paper.tex $(PNGS)
- TEXINPUTS=$(white_paper_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(white_paper_TEXINPUTS) pdflatex $<
- TEXINPUTS=$(white_paper_TEXINPUTS) pdflatex $< \
- test "x$(white_paper_dir)" != x. \
- && mv -f white_paper.pdf $(white_paper_dir)
-
-
-dist_doc_DATA += \
- $(WHITE_PAPER_HTML) \
- $(WHITE_PAPER_PDF)
-
-EXTRA_DIST += \
- $(white_paper_dir)/white_paper.tex \
- $(PNGS) \
- $(EPSS)
-
-# FIXME: Remove unnecessary patterns.
-CLEANFILES += \
- white_paper_image.* \
- white_paper.pdf \
- *.log *.idx *.out *.aux
-
-# FIXME: Likewise.
-clean-local:
- -rm -rf white_paper_html figures
--
1.5.6.5
1
0
last-svn-commit-31-g0a5e4a1 Improve dependencies of some documentation products.
by Roland Levillain 12 Mar '10
by Roland Levillain 12 Mar '10
12 Mar '10
* doc/ref_guide/ref_guide.mk (ref_guide_dependencies):
New variable.
Use it to define dependencies of...
($(REF_GUIDE_HH), $(REF_GUIDE_PDF)):
...these targets.
* doc/technical/technical.mk (technical_dependencies):
New variable.
Use it to define dependencies of...
($(TECHNICAL_HH), $(TECHNICAL_PDF)):
...these targets.
* doc/tutorial/tutorial.mk (tutorial_dependencies):
New variable.
Use it to define dependencies of...
($(TUTORIAL_HH), $(TUTORIAL_PDF)):
...these targets.
---
milena/ChangeLog | 20 ++++++++++++++++++++
milena/doc/ref_guide/ref_guide.mk | 13 +++++++++++--
milena/doc/technical/technical.mk | 9 +++++++--
milena/doc/tutorial/tutorial.mk | 14 +++++++++++---
4 files changed, 49 insertions(+), 7 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index b69f66f..dabbddb 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,25 @@
2010-03-12 Roland Levillain <roland(a)lrde.epita.fr>
+ Improve dependencies of some documentation products.
+
+ * doc/ref_guide/ref_guide.mk (ref_guide_dependencies):
+ New variable.
+ Use it to define dependencies of...
+ ($(REF_GUIDE_HH), $(REF_GUIDE_PDF)):
+ ...these targets.
+ * doc/technical/technical.mk (technical_dependencies):
+ New variable.
+ Use it to define dependencies of...
+ ($(TECHNICAL_HH), $(TECHNICAL_PDF)):
+ ...these targets.
+ * doc/tutorial/tutorial.mk (tutorial_dependencies):
+ New variable.
+ Use it to define dependencies of...
+ ($(TUTORIAL_HH), $(TUTORIAL_PDF)):
+ ...these targets.
+
+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.
diff --git a/milena/doc/ref_guide/ref_guide.mk b/milena/doc/ref_guide/ref_guide.mk
index 1a9ff12..d776b2f 100644
--- a/milena/doc/ref_guide/ref_guide.mk
+++ b/milena/doc/ref_guide/ref_guide.mk
@@ -27,6 +27,15 @@ ref-guide: ref-guide-html ref-guide-pdf
ref_guide_dir = $(doc_dir)/ref_guide
+# 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.
+ref_guide_dependencies = \
+ $(doc_dir)/split-examples.stamp \
+ $(doc_dir)/split-outputs.stamp \
+ $(doc_dir)/figures.stamp
+
# FIXME: As in milena/doc/Makefile.am, we should probably strip
# $(srcdir) prefixes from target variables, e.g. instead of:
#
@@ -59,14 +68,14 @@ ref_guide_dir = $(doc_dir)/ref_guide
# files.
REF_GUIDE_HH = $(ref_guide_dir)/ref_guide.hh
ref-guide-html: $(REF_GUIDE_HH)
-$(REF_GUIDE_HH): $(ref_guide_dir)/ref_guide.tex $(doc_dir)/figures.stamp
+$(REF_GUIDE_HH): $(ref_guide_dir)/ref_guide.tex $(ref_guide_dependencies)
$(doc_dir)/tools/todoxygen.sh $< $(ref_guide_dir) $(doc_dir)
# Final product.
REF_GUIDE_PDF = $(ref_guide_dir)/ref_guide.pdf
ref-guide-pdf: $(REF_GUIDE_PDF)
-$(REF_GUIDE_PDF): $(ref_guide_dir)/ref_guide.tex $(doc_dir)/figures.stamp
+$(REF_GUIDE_PDF): $(ref_guide_dir)/ref_guide.tex $(ref_guide_dependencies)
TEXINPUTS=$(ref_guide_TEXINPUTS) pdflatex $<
TEXINPUTS=$(ref_guide_TEXINPUTS) pdflatex $<
TEXINPUTS=$(ref_guide_TEXINPUTS) pdflatex $< \
diff --git a/milena/doc/technical/technical.mk b/milena/doc/technical/technical.mk
index 56fcf71..8c5ccea 100644
--- a/milena/doc/technical/technical.mk
+++ b/milena/doc/technical/technical.mk
@@ -27,6 +27,11 @@ technical: technical-html technical-pdf
technical_dir = $(doc_dir)/technical
+# FIXME: Check these dependencies. And it'd be better to depend on
+# actual files rather than timestamps correponding to a bunch of
+# files.
+technical_dependencies = $(doc_dir)/figures.stamp
+
# FIXME: As in milena/doc/Makefile.am, we should probably strip
# $(srcdir) prefixes from target variables, e.g. instead of:
#
@@ -59,14 +64,14 @@ technical_dir = $(doc_dir)/technical
# about `.html' files.
TECHNICAL_HH = $(technical_dir)/technical.hh
technical-html: $(TECHNICAL_HH)
-$(TECHNICAL_HH): $(technical_dir)/technical.tex $(doc_dir)/figures.stamp
+$(TECHNICAL_HH): $(technical_dir)/technical.tex $(technical_dependencies)
$(doc_dir)/tools/todoxygen.sh $< $(technical_dir) $(doc_dir)
# Final product.
TECHNICAL_PDF = $(technical_dir)/technical.pdf
technical-pdf: $(TECHNICAL_PDF)
-$(TECHNICAL_PDF): $(technical_dir)/technical.tex $(doc_dir)/figures.stamp
+$(TECHNICAL_PDF): $(technical_dir)/technical.tex $(technical_dependencies)
TEXINPUTS=$(technical_TEXINPUTS) pdflatex $<
TEXINPUTS=$(technical_TEXINPUTS) pdflatex $<
TEXINPUTS=$(technical_TEXINPUTS) pdflatex $< \
diff --git a/milena/doc/tutorial/tutorial.mk b/milena/doc/tutorial/tutorial.mk
index 6cc6ef4..7f65365 100644
--- a/milena/doc/tutorial/tutorial.mk
+++ b/milena/doc/tutorial/tutorial.mk
@@ -27,6 +27,15 @@ tutorial: tutorial-html tutorial-pdf
tutorial_dir = $(doc_dir)/tutorial
+# 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.
+tutorial_dependencies = \
+ $(doc_dir)/split-examples.stamp \
+ $(doc_dir)/split-outputs.stamp \
+ $(doc_dir)/figures.stamp
+
# FIXME: As in milena/doc/Makefile.am, we should probably strip
# $(srcdir) prefixes from target variables, e.g. instead of:
#
@@ -59,14 +68,13 @@ tutorial_dir = $(doc_dir)/tutorial
# files.
TUTORIAL_HH = $(tutorial_dir)/tutorial.hh
tutorial-html: $(TUTORIAL_HH)
-$(TUTORIAL_HH): $(tutorial_dir)/tutorial.tex $(doc_dir)/figures.stamp
+$(TUTORIAL_HH): $(tutorial_dir)/tutorial.tex $(tutorial_dependencies)
$(doc_dir)/tools/todoxygen.sh $< $(tutorial_dir) $(doc_dir)
-
# Final product.
TUTORIAL_PDF = $(tutorial_dir)/tutorial.pdf
tutorial-pdf: $(TUTORIAL_PDF)
-$(TUTORIAL_PDF): $(tutorial_dir)/tutorial.tex $(doc_dir)/figures.stamp
+$(TUTORIAL_PDF): $(tutorial_dir)/tutorial.tex $(tutorial_dependencies)
TEXINPUTS=$(tutorial_TEXINPUTS) pdflatex $<
TEXINPUTS=$(tutorial_TEXINPUTS) pdflatex $<
TEXINPUTS=$(tutorial_TEXINPUTS) pdflatex $< \
--
1.5.6.5
1
0
last-svn-commit-30-g13f1c3c Revamp the Makefile machinery in milena/doc/examples/.
by Roland Levillain 12 Mar '10
by Roland Levillain 12 Mar '10
12 Mar '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 1340ca5..b69f66f 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
last-svn-commit-29-g1a017e9 configure.ac: Configure milena/doc/tools/data.hh.
by Roland Levillain 12 Mar '10
by Roland Levillain 12 Mar '10
12 Mar '10
---
ChangeLog | 4 ++++
configure.ac | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dedc814..acd9802 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-28-g840243a Have documentation's examples not depend on hard-coded paths.
by Roland Levillain 12 Mar '10
by Roland Levillain 12 Mar '10
12 Mar '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 676e5b0..1340ca5 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-51-gd957e47 mln/labeling/colorize.hh: Add support for value::qt::rgb32.
by Guillaume Lazzara 11 Mar '10
by Guillaume Lazzara 11 Mar '10
11 Mar '10
---
milena/ChangeLog | 4 ++++
milena/mln/labeling/colorize.hh | 26 ++++++++++++++++++++++----
2 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index ec2ef35..66c1c51 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-16 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * mln/labeling/colorize.hh: Add support for value::qt::rgb32.
+
2010-02-19 Guillaume Lazzara <z(a)lrde.epita.fr>
Small fixes in Milena.
diff --git a/milena/mln/labeling/colorize.hh b/milena/mln/labeling/colorize.hh
index 69493d5..b25aa35 100644
--- a/milena/mln/labeling/colorize.hh
+++ b/milena/mln/labeling/colorize.hh
@@ -114,9 +114,9 @@ namespace mln
V random_color(const V&);
- template <unsigned n>
- mln::value::rgb<n>
- random_color(const mln::value::rgb<n>&)
+ template <typename RGB>
+ RGB
+ random_color_rgb(const RGB&)
{
static unsigned
nelements = colorize_::max_value - colorize_::min_value + 1;
@@ -153,9 +153,27 @@ namespace mln
while (green_[green - colorize_::min_value].has(blue));
green_[green - colorize_::min_value].insert(blue);
- return mln::value::rgb<n>(red, green, blue);
+ return RGB(red, green, blue);
+ }
+
+ template <unsigned n>
+ mln::value::rgb<n>
+ random_color(const mln::value::rgb<n>& v)
+ {
+ return random_color_rgb(v);
}
+
+# ifdef MLN_VALUE_QT_RGB32_HH
+
+ mln::value::qt::rgb32
+ random_color(const mln::value::qt::rgb32& v)
+ {
+ return random_color_rgb(v);
+ }
+
+# endif // ! MLN_VALUE_QT_RGB32_HH
+
}
template <typename V, typename L>
--
1.5.6.5
1
0
last-svn-commit-52-g56ab608 Add a small tool to recognize text in a binary image.
by Guillaume Lazzara 11 Mar '10
by Guillaume Lazzara 11 Mar '10
11 Mar '10
* src/text/Makefile.am: New target.
* src/text/pbm_recognition.cc: New.
* text/recognition.hh: Add an overload taking an image as
argument.
---
scribo/ChangeLog | 11 +++
scribo/src/text/Makefile.am | 10 ++
.../unskew.cc => text/pbm_recognition.cc} | 31 ++++---
scribo/text/recognition.hh | 96 +++++++++++++++-----
4 files changed, 113 insertions(+), 35 deletions(-)
copy scribo/src/{preprocessing/unskew.cc => text/pbm_recognition.cc} (73%)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 4626c4d..b29f31e 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,16 @@
2010-02-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Add a small tool to recognize text in a binary image.
+
+ * src/text/Makefile.am: New target.
+
+ * src/text/pbm_recognition.cc: New.
+
+ * text/recognition.hh: Add an overload taking an image as
+ argument.
+
+2010-02-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Add a subsampling algorithm.
* subsampling/integral.hh: New. Compute a subsample image and an
diff --git a/scribo/src/text/Makefile.am b/scribo/src/text/Makefile.am
index b84e0dd..aab9b19 100644
--- a/scribo/src/text/Makefile.am
+++ b/scribo/src/text/Makefile.am
@@ -38,5 +38,15 @@ if HAVE_TIFF
$(TESSERACT_LDFLAGS) \
$(TIFF_LDFLAGS) \
-lpthread
+
+ bin_PROGRAMS += pbm_recognition
+ pbm_recognition_SOURCES = pbm_recognition.cc
+ pbm_recognition_CPPFLAGS = $(AM_CPPFLAGS) \
+ $(TESSERACT_CPPFLAGS) \
+ $(TIFF_CPPFLAGS)
+ pbm_recognition_LDFLAGS = $(AM_LDFLAGS) \
+ $(TESSERACT_LDFLAGS) \
+ $(TIFF_LDFLAGS) \
+ -lpthread
endif HAVE_TIFF
endif HAVE_TESSERACT
diff --git a/scribo/src/preprocessing/unskew.cc b/scribo/src/text/pbm_recognition.cc
similarity index 73%
copy from scribo/src/preprocessing/unskew.cc
copy to scribo/src/text/pbm_recognition.cc
index b8c1979..70ceca1 100644
--- a/scribo/src/preprocessing/unskew.cc
+++ b/scribo/src/text/pbm_recognition.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -23,36 +23,43 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
+#include <iostream>
+
#include <mln/core/image/image2d.hh>
-#include <mln/io/pbm/all.hh>
+#include <mln/io/pbm/load.hh>
+
+#include <scribo/text/recognition.hh>
-#include <scribo/preprocessing/unskew.hh>
#include <scribo/debug/usage.hh>
const char *args_desc[][2] =
{
- { "input.pbm", "A binary image. 'True' for objects, 'false' for background." },
+ { "input.pbm", "A binary image. 'True' for objects, 'False'\
+for the background." },
{0, 0}
};
-int main(int argc, char *argv[])
+int main(int argc, char* argv[])
{
- mln::trace::entering("main");
+ using namespace scribo;
using namespace mln;
- if (argc != 3)
+ if (argc != 2)
return scribo::debug::usage(argv,
- "Unskew a binary image",
- "input.pbm output.pbm",
- args_desc, "A binary image.");
+ "Text recognition",
+ "input.pbm",
+ args_desc,
+ "The text is printed on the standard output");
+
+ trace::entering("main");
image2d<bool> input;
io::pbm::load(input, argv[1]);
- io::pbm::save(scribo::preprocessing::unskew(input).first(), argv[2]);
+ scribo::text::recognition(input, "fra");
- mln::trace::exiting("main");
+ trace::exiting("main");
}
diff --git a/scribo/text/recognition.hh b/scribo/text/recognition.hh
index c4dd6e2..364e56b 100644
--- a/scribo/text/recognition.hh
+++ b/scribo/text/recognition.hh
@@ -39,41 +39,28 @@
# include <mln/core/image/dmorph/image_if.hh>
# include <mln/core/concept/neighborhood.hh>
# include <mln/core/site_set/box.hh>
+
# include <mln/util/array.hh>
-# include <mln/labeling/blobs.hh>
# include <mln/data/fill.hh>
+# include <mln/data/paste.hh>
# include <mln/pw/all.hh>
-# include <mln/transform/distance_front.hh>
-
-# include <mln/morpho/thickening.hh>
-# include <mln/morpho/dilation.hh>
-
# include <mln/core/alias/w_window2d_int.hh>
# include <mln/make/w_window2d_int.hh>
# include <mln/border/resize.hh>
-# include <mln/win/rectangle2d.hh>
-# include <mln/win/disk2d.hh>
-# include <mln/win/octagon2d.hh>
-
-# include <mln/debug/put_word.hh>
-
# include <scribo/core/macros.hh>
# include <scribo/util/text.hh>
# include <scribo/text/clean.hh>
-# include <tesseract/baseapi.h>
+# include <scribo/core/line_set.hh>
-#include <mln/labeling/colorize.hh>
-
+# include <tesseract/baseapi.h>
-#include <mln/debug/filename.hh>
-#include <mln/io/pbm/save.hh>
namespace scribo
@@ -96,7 +83,15 @@ namespace scribo
void
recognition(const line_set<L>& lines,
const char *language,
- const char *output_file);
+ const char *output_file = 0);
+
+
+ /// Recognize text from an image.
+ template <typename I>
+ void
+ recognition(const Image<I>& line,
+ const char *language,
+ const char *output_file = 0);
@@ -109,7 +104,7 @@ namespace scribo
void
recognition(const line_set<L>& lines,
const char *language,
- const char *output_file)
+ const char *output_file = 0)
{
trace::entering("scribo::text::recognition");
@@ -182,10 +177,6 @@ namespace scribo
text_ima_cleaned.nrows()); // n rows
-
- mln_site(L) p = lines(i).bbox().pcenter();
- p.col() -= (lines(i).bbox().pmax().col()
- - lines(i).bbox().pmin().col()) / 2;
if (s != 0)
{
std::cerr << s << std::endl;
@@ -204,6 +195,65 @@ namespace scribo
}
+ template <typename I>
+ void
+ recognition(const Image<I>& line_,
+ const char *language,
+ const char *output_file = 0)
+ {
+ trace::entering("scribo::text::recognition");
+
+ const I& line = exact(line_);
+ mln_precondition(line.is_valid());
+
+ // Initialize Tesseract.
+ TessBaseAPI::InitWithLanguage(NULL, NULL, language, NULL, false, 0, NULL);
+
+ std::ofstream file;
+ if (output_file != 0)
+ file.open(output_file);
+
+ mln_domain(I) box = line.domain();
+ // Make sure characters are isolated from the borders.
+ // Help Tesseract.
+ box.enlarge(2);
+
+ I text_ima(box);
+ data::fill(text_ima, false);
+ data::paste(line, text_ima);
+
+ // Make sure there is no border.
+ border::resize(text_ima, 0);
+
+ // Recognize characters.
+ char* s = TessBaseAPI::TesseractRect(
+ (unsigned char*) text_ima.buffer(),
+ sizeof (bool), // Pixel size.
+ text_ima.ncols() * sizeof (bool), // Row_offset
+ 0, // Left
+ 0, // Top
+ text_ima.ncols(), // n cols
+ text_ima.nrows()); // n rows
+
+
+ if (s != 0)
+ {
+ std::cout << s << std::endl;
+ if (output_file != 0)
+ file << line.domain() << " " << s << std::endl;
+ }
+
+ // The string has been allocated by Tesseract. We must free it.
+ free(s);
+
+ if (output_file != 0)
+ file.close();
+
+ trace::exiting("scribo::text::recognition");
+ }
+
+
+
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace scribo::text
--
1.5.6.5
1
0
* filter/object_links_bottom_aligned.hh,
* filter/object_links_center_aligned.hh,
* filter/object_links_non_aligned_simple.hh,
* filter/object_links_top_aligned.hh: Pass the proper dimension as
routine argument.
---
scribo/ChangeLog | 11 +++++++
scribo/filter/object_links_bottom_aligned.hh | 2 +-
scribo/filter/object_links_center_aligned.hh | 2 +-
scribo/filter/object_links_non_aligned_simple.hh | 32 ++++++++++++---------
scribo/filter/object_links_top_aligned.hh | 2 +-
5 files changed, 32 insertions(+), 17 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 8488ae3..dfbf01a 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,16 @@
2009-12-14 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Fix object links filters.
+
+ * filter/object_links_bottom_aligned.hh,
+ * filter/object_links_center_aligned.hh,
+ * filter/object_links_non_aligned_simple.hh,
+ * filter/object_links_top_aligned.hh: Pass the proper dimension as
+ routine argument.
+
+
+2009-12-14 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Cleanup Sauvola's binarization code.
* binarization/sauvola_threshold.hh,
diff --git a/scribo/filter/object_links_bottom_aligned.hh b/scribo/filter/object_links_bottom_aligned.hh
index d950a6e..1afebf7 100644
--- a/scribo/filter/object_links_bottom_aligned.hh
+++ b/scribo/filter/object_links_bottom_aligned.hh
@@ -102,7 +102,7 @@ namespace scribo
object_links<L>
output = object_links_non_aligned_simple(objects, links,
- 1, max_alpha);
+ 2, max_alpha);
trace::exiting("scribo::filter::object_links_bottom_aligned");
return output;
diff --git a/scribo/filter/object_links_center_aligned.hh b/scribo/filter/object_links_center_aligned.hh
index e44f3cd..abbac9e 100644
--- a/scribo/filter/object_links_center_aligned.hh
+++ b/scribo/filter/object_links_center_aligned.hh
@@ -95,7 +95,7 @@ namespace scribo
object_links<L>
output = object_links_non_aligned_simple(objects, links,
- 2, max_alpha);
+ 0, max_alpha);
trace::exiting("scribo::filter::object_links_center_aligned");
return output;
diff --git a/scribo/filter/object_links_non_aligned_simple.hh b/scribo/filter/object_links_non_aligned_simple.hh
index 032b4d0..706497d 100644
--- a/scribo/filter/object_links_non_aligned_simple.hh
+++ b/scribo/filter/object_links_non_aligned_simple.hh
@@ -81,9 +81,9 @@ namespace scribo
The angle between the two bottoms must be lower than \p alpha.
edge values :
- 0 = top
- 1 = bottom
- 2 = center
+ 0 = center
+ 1 = top
+ 2 = bottom
*/
template <typename L>
@@ -117,44 +117,47 @@ namespace scribo
float max_alpha_rad = (max_alpha / 180.0f) * math::pi;
- // Top
+ // Center
if (edge == 0)
{
for_all_components(i, objects.bboxes())
+ {
if (links[i] != i)
{
- dr = math::abs(bboxes[i].pmin().row()
- - bboxes[links[i]].pmin().row());
+ dr = math::abs(bboxes[i].center().row()
+ - bboxes[links[i]].center().row());
dc = math::abs(bboxes[i].center().col()
- bboxes[links[i]].center().col());
if (std::atan(dr / dc) > max_alpha_rad)
output[i] = i;
}
+ }
}
- // Bottom
+ // Top
else if (edge == 1)
+ {
for_all_components(i, objects.bboxes())
- {
if (links[i] != i)
{
- dr = math::abs(bboxes[i].pmax().row()
- - bboxes[links[i]].pmax().row());
+ dr = math::abs(bboxes[i].pmin().row()
+ - bboxes[links[i]].pmin().row());
dc = math::abs(bboxes[i].center().col()
- bboxes[links[i]].center().col());
if (std::atan(dr / dc) > max_alpha_rad)
output[i] = i;
}
- }
- // Center
+ }
+ // Bottom
else if (edge == 2)
+ {
for_all_components(i, objects.bboxes())
{
if (links[i] != i)
{
- dr = math::abs(bboxes[i].center().row()
- - bboxes[links[i]].center().row());
+ dr = math::abs(bboxes[i].pmax().row()
+ - bboxes[links[i]].pmax().row());
dc = math::abs(bboxes[i].center().col()
- bboxes[links[i]].center().col());
@@ -162,6 +165,7 @@ namespace scribo
output[i] = i;
}
}
+ }
else
{
trace::warning("Invalid edge value... Aborting computation.");
diff --git a/scribo/filter/object_links_top_aligned.hh b/scribo/filter/object_links_top_aligned.hh
index 47e26c8..4a92c96 100644
--- a/scribo/filter/object_links_top_aligned.hh
+++ b/scribo/filter/object_links_top_aligned.hh
@@ -102,7 +102,7 @@ namespace scribo
object_links<L>
output = object_links_non_aligned_simple(objects, links,
- 0,
+ 1,
max_alpha);
trace::exiting("scribo::filter::object_links_top_aligned");
--
1.5.6.5
1
0
last-svn-commit-28-g80b330e primitive/extract/objects.hh: Compute and store mass centers.
by Guillaume Lazzara 11 Mar '10
by Guillaume Lazzara 11 Mar '10
11 Mar '10
---
scribo/ChangeLog | 5 ++++-
scribo/primitive/extract/objects.hh | 8 +++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index dfbf01a..a11166a 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,7 @@
+2009-12-15 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * primitive/extract/objects.hh: Compute and store mass centers.
+
2009-12-14 Guillaume Lazzara <z(a)lrde.epita.fr>
Fix object links filters.
@@ -8,7 +12,6 @@
* filter/object_links_top_aligned.hh: Pass the proper dimension as
routine argument.
-
2009-12-14 Guillaume Lazzara <z(a)lrde.epita.fr>
Cleanup Sauvola's binarization code.
diff --git a/scribo/primitive/extract/objects.hh b/scribo/primitive/extract/objects.hh
index 2ca2f5d..3f1af7c 100644
--- a/scribo/primitive/extract/objects.hh
+++ b/scribo/primitive/extract/objects.hh
@@ -119,8 +119,14 @@ namespace scribo
results = labeling::blobs_and_compute(input, nbh, nobjects,
accu_bbox());
+ // FIXME: enable mass centers computation and maybe merge this
+ // computation with blobs computation above.
+ util::array<mln_result(accu::center<mln_site(I)>)>
+ mass_centers;
+ mass_centers = labeling::compute(accu::meta::center(),
+ results.first(), nobjects);
object_image(L)
- output(results.first(), nobjects, results.second());
+ output(results.first(), nobjects, results.second(), mass_centers);
trace::exiting("scribo::objects");
return output;
--
1.5.6.5
1
0