* doc/Makefile.am ($(srcdir)/figures.mk): New rule.
(regen-figures-mk): New phony target.
(regen-am): Invoke regen-figures-mk.
* doc/figures.mk: Regen.
---
milena/ChangeLog | 9 ++++
milena/doc/Makefile.am | 16 ++++++-
milena/doc/figures.mk | 106 +++++++++++++++++++-----------------------------
3 files changed, 65 insertions(+), 66 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 43ab816..07e3a51 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,12 @@
+2010-03-22 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Generate the list of figures in the documentation.
+
+ * doc/Makefile.am ($(srcdir)/figures.mk): New rule.
+ (regen-figures-mk): New phony target.
+ (regen-am): Invoke regen-figures-mk.
+ * doc/figures.mk: Regen.
+
2010-03-20 Roland Levillain <roland(a)lrde.epita.fr>
Add a script to generate doc/figures.mk.
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index ff962ce..8209278 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -94,9 +94,13 @@ DOC_PACKAGES = doxyfuns.sty milena.sty
## Figures. ##
## --------- ##
+# Generate a Makefile helper containing the list of generated figures.
EXTRA_DIST += gen-figures-mk
-
-# Generated figures.
+$(srcdir)/figures.mk: $(srcdir)/gen-figures-mk
+ rm -f $@.tmp
+ cd $(srcdir) && ./gen-figures-mk >figures.mk.tmp
+ mv -f $@.tmp $@
+ chmod -w $@
include $(srcdir)/figures.mk
# FIXME: $(FIGURES) is not added to EXTRA_DIST (though it is added to
# MAINTAINERCLEANFILES), because its contents is already in EXTRA_DIST
@@ -104,6 +108,13 @@ include $(srcdir)/figures.mk
# variables may be removed someday (see FIXME below).
MAINTAINERCLEANFILES = $(FIGURES)
+.PHONY: regen-figures-mk
+regen-figures-mk:
+ rm -f $(srcdir)/figures.mk.tmp
+ cd $(srcdir) && ./gen-figures-mk >figures.mk.tmp
+ mv -f $(srcdir)/figures.mk.tmp $(srcdir)/figures.mk
+ chmod -w $(srcdir)/figures.mk
+
# This image seems to be used nowhere.
MORE_FIGURES = figures/accu_image_morpher_big_picture.pdf
EXTRA_DIST += $(MORE_FIGURES)
@@ -953,6 +964,7 @@ regen-split-outputs-mk:
EXTRA_DIST += generate_dist_files.sh
include $(top_srcdir)/build-aux/regen-recursive.mk
regen-am:
+ $(MAKE) $(AM_MAKEFLAGS) regen-figures-mk
$(MAKE) $(AM_MAKEFLAGS) regen-pbm-figures-mk
$(MAKE) $(AM_MAKEFLAGS) regen-pgm-figures-mk
$(MAKE) $(AM_MAKEFLAGS) regen-ppm-figures-mk
diff --git a/milena/doc/figures.mk b/milena/doc/figures.mk
index 6bcfc3d..4dce4cd 100644
--- a/milena/doc/figures.mk
+++ b/milena/doc/figures.mk
@@ -1,35 +1,13 @@
-## Figures' dependencies. -*- Makefile-Automake -*-
-
-## Copyright (C) 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/>.
+## Generated by gen-figures-mk. Do not edit by hand.
## Figures depend on the timestamp associated with their generator.
## See also examples-outputs.mk.
-## FIXME: Generate this file.
-##
-## It'd be cool if programs themselves could generate a list of their
-## outputs (as a side effect) or at least if the extraction of this
-## list from the source file was straightforward.
-
-EXTEND_FIGURES = \
- $(srcdir)/figures/extend-1.ppm \
- $(srcdir)/figures/extend-2.ppm \
- $(srcdir)/figures/extend-3.ppm \
- $(srcdir)/figures/extend-4.ppm \
+EXTEND_FIGURES = \
+ $(srcdir)/figures/extend-1.ppm \
+ $(srcdir)/figures/extend-2.ppm \
+ $(srcdir)/figures/extend-3.ppm \
+ $(srcdir)/figures/extend-4.ppm \
$(srcdir)/figures/extend-5.ppm
$(EXTEND_FIGURES): $(srcdir)/examples/extend.stamp
## Recover from the removal of $@
@@ -38,8 +16,8 @@ $(EXTEND_FIGURES): $(srcdir)/examples/extend.stamp
$(MAKE) $(AM_MAKEFLAGS) $<; \
fi
-FILL_FIGURES = \
- $(srcdir)/figures/fill-1.ppm \
+FILL_FIGURES = \
+ $(srcdir)/figures/fill-1.ppm \
$(srcdir)/figures/fill-2.ppm
$(FILL_FIGURES): $(srcdir)/examples/fill.stamp
## Recover from the removal of $@
@@ -57,10 +35,10 @@ $(FILL_IMAGEIF_CFUN_FIGURES):
$(srcdir)/examples/fill-imageif-cfun.stamp
$(MAKE) $(AM_MAKEFLAGS) $<; \
fi
-FILL_SUBDOMAIN_FIGURES = \
- $(srcdir)/figures/fill-subdomain-1.pbm \
- $(srcdir)/figures/fill-subdomain-2.ppm \
- $(srcdir)/figures/fill-subdomain-3.ppm \
+FILL_SUBDOMAIN_FIGURES = \
+ $(srcdir)/figures/fill-subdomain-1.pbm \
+ $(srcdir)/figures/fill-subdomain-2.ppm \
+ $(srcdir)/figures/fill-subdomain-3.ppm \
$(srcdir)/figures/fill-subdomain-4.ppm
$(FILL_SUBDOMAIN_FIGURES): $(srcdir)/examples/fill-subdomain.stamp
## Recover from the removal of $@
@@ -78,8 +56,8 @@ $(IMA_SAVE_FIGURES): $(srcdir)/examples/ima-save.stamp
$(MAKE) $(AM_MAKEFLAGS) $<; \
fi
-IMA2D_ROT_FIGURES = \
- $(srcdir)/figures/ima2d-rot-1.ppm \
+IMA2D_ROT_FIGURES = \
+ $(srcdir)/figures/ima2d-rot-1.ppm \
$(srcdir)/figures/ima2d-rot-2.ppm
$(IMA2D_ROT_FIGURES): $(srcdir)/examples/ima2d-rot.stamp
## Recover from the removal of $@
@@ -88,8 +66,8 @@ $(IMA2D_ROT_FIGURES): $(srcdir)/examples/ima2d-rot.stamp
$(MAKE) $(AM_MAKEFLAGS) $<; \
fi
-LABELING_COMPUTE_FIGURES = \
- $(srcdir)/figures/labeling-compute-1.pbm \
+LABELING_COMPUTE_FIGURES = \
+ $(srcdir)/figures/labeling-compute-1.pbm \
$(srcdir)/figures/labeling-compute-2.ppm
$(LABELING_COMPUTE_FIGURES): $(srcdir)/examples/labeling-compute.stamp
## Recover from the removal of $@
@@ -98,9 +76,9 @@ $(LABELING_COMPUTE_FIGURES): $(srcdir)/examples/labeling-compute.stamp
$(MAKE) $(AM_MAKEFLAGS) $<; \
fi
-LOGICAL_NOT_FIGURES = \
- $(srcdir)/figures/logical-not-1.pbm \
- $(srcdir)/figures/logical-not-2.pbm \
+LOGICAL_NOT_FIGURES = \
+ $(srcdir)/figures/logical-not-1.pbm \
+ $(srcdir)/figures/logical-not-2.pbm \
$(srcdir)/figures/logical-not-3.pbm
$(LOGICAL_NOT_FIGURES): $(srcdir)/examples/logical-not.stamp
## Recover from the removal of $@
@@ -118,8 +96,8 @@ $(TUTO2_FIRST_IMAGE_FIGURES):
$(srcdir)/examples/tuto2_first_image.stamp
$(MAKE) $(AM_MAKEFLAGS) $<; \
fi
-TUTO3_COLORIZE_FIGURES = \
- $(srcdir)/figures/tuto3_colorize-1.pgm \
+TUTO3_COLORIZE_FIGURES = \
+ $(srcdir)/figures/tuto3_colorize-1.pgm \
$(srcdir)/figures/tuto3_colorize-2.ppm
$(TUTO3_COLORIZE_FIGURES): $(srcdir)/examples/tuto3/colorize.stamp
## Recover from the removal of $@
@@ -128,9 +106,9 @@ $(TUTO3_COLORIZE_FIGURES): $(srcdir)/examples/tuto3/colorize.stamp
$(MAKE) $(AM_MAKEFLAGS) $<; \
fi
-TUTO3_RW_IMAGE_FIGURES = \
- $(srcdir)/figures/tuto3_rw_image-1.ppm \
- $(srcdir)/figures/tuto3_rw_image-2.ppm \
+TUTO3_RW_IMAGE_FIGURES = \
+ $(srcdir)/figures/tuto3_rw_image-1.ppm \
+ $(srcdir)/figures/tuto3_rw_image-2.ppm \
$(srcdir)/figures/tuto3_rw_image-3.ppm
$(TUTO3_RW_IMAGE_FIGURES): $(srcdir)/examples/tuto3_rw_image.stamp
## Recover from the removal of $@
@@ -139,12 +117,12 @@ $(TUTO3_RW_IMAGE_FIGURES): $(srcdir)/examples/tuto3_rw_image.stamp
$(MAKE) $(AM_MAKEFLAGS) $<; \
fi
-TUTO4_GENERICITY_AND_ALGORITHMS_FIGURES = \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-1.ppm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-2.ppm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-3.pbm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-4.ppm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-5.ppm \
+TUTO4_GENERICITY_AND_ALGORITHMS_FIGURES = \
+ $(srcdir)/figures/tuto4_genericity_and_algorithms-1.ppm \
+ $(srcdir)/figures/tuto4_genericity_and_algorithms-2.ppm \
+ $(srcdir)/figures/tuto4_genericity_and_algorithms-3.pbm \
+ $(srcdir)/figures/tuto4_genericity_and_algorithms-4.ppm \
+ $(srcdir)/figures/tuto4_genericity_and_algorithms-5.ppm \
$(srcdir)/figures/tuto4_genericity_and_algorithms-6.ppm
$(TUTO4_GENERICITY_AND_ALGORITHMS_FIGURES):
$(srcdir)/examples/tuto4_genericity_and_algorithms.stamp
## Recover from the removal of $@
@@ -154,16 +132,16 @@ $(TUTO4_GENERICITY_AND_ALGORITHMS_FIGURES):
$(srcdir)/examples/tuto4_genericity_
fi
# The list of all generated figures.
-FIGURES = \
- $(EXTEND_FIGURES) \
- $(FILL_FIGURES) \
- $(FILL_IMAGEIF_CFUN_FIGURES) \
- $(FILL_SUBDOMAIN_FIGURES) \
- $(IMA_SAVE_FIGURES) \
- $(IMA2D_ROT_FIGURES) \
- $(LABELING_COMPUTE_FIGURES) \
- $(LOGICAL_NOT_FIGURES) \
- $(TUTO2_FIRST_IMAGE_FIGURES) \
- $(TUTO3_COLORIZE_FIGURES) \
- $(TUTO3_RW_IMAGE_FIGURES) \
+FIGURES = \
+ $(EXTEND_FIGURES) \
+ $(FILL_FIGURES) \
+ $(FILL_IMAGEIF_CFUN_FIGURES) \
+ $(FILL_SUBDOMAIN_FIGURES) \
+ $(IMA_SAVE_FIGURES) \
+ $(IMA2D_ROT_FIGURES) \
+ $(LABELING_COMPUTE_FIGURES) \
+ $(LOGICAL_NOT_FIGURES) \
+ $(TUTO2_FIRST_IMAGE_FIGURES) \
+ $(TUTO3_COLORIZE_FIGURES) \
+ $(TUTO3_RW_IMAGE_FIGURES) \
$(TUTO4_GENERICITY_AND_ALGORITHMS_FIGURES)
--
1.5.6.5
Show replies by date