* doc/gen-figures-mk: Generate Make variables PBM_FIGURES,
PGM_FIGURES and PPM_FIGURES in output.
* doc/figures.mk: Regen.
* doc/Makefile.am: No longer include $(srcdir)/pbm-figures.mk,
$(srcdir)/pgm-figures.mk nor $(srcdir)/ppm-figures.mk.
($(srcdir)/pbm-figures.mk, regen-pbm-figures-mk)
($(srcdir)/pgm-figures.mk, regen-pgm-figures-mk)
($(srcdir)/ppm-figures.mk, regen-ppm-figures-mk):
Remove rules.
(EXTRA_DIST): Add $(FIGURES).
Remove $(PBM_FIGURES), $(PGM_FIGURES) and $(PPM_FIGURES).
* doc/pbm-figures.mk,
* doc/pgm-figures.mk,
* doc/ppm-figures.mk:
Remove.
---
milena/ChangeLog | 20 ++++++++++
milena/doc/Makefile.am | 92 ++++++--------------------------------------
milena/doc/figures.mk | 41 ++++++++++++++++++++
milena/doc/gen-figures-mk | 29 ++++++++++++++-
milena/doc/pbm-figures.mk | 11 -----
milena/doc/pgm-figures.mk | 7 ---
milena/doc/ppm-figures.mk | 29 --------------
7 files changed, 102 insertions(+), 127 deletions(-)
delete mode 100644 milena/doc/pbm-figures.mk
delete mode 100644 milena/doc/pgm-figures.mk
delete mode 100644 milena/doc/ppm-figures.mk
diff --git a/milena/ChangeLog b/milena/ChangeLog
index a68576b..5e7ce97 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,25 @@
2010-03-22 Roland Levillain <roland(a)lrde.epita.fr>
+ Have doc/gen-figures-mk generate more Makefile bits.
+
+ * doc/gen-figures-mk: Generate Make variables PBM_FIGURES,
+ PGM_FIGURES and PPM_FIGURES in output.
+ * doc/figures.mk: Regen.
+ * doc/Makefile.am: No longer include $(srcdir)/pbm-figures.mk,
+ $(srcdir)/pgm-figures.mk nor $(srcdir)/ppm-figures.mk.
+ ($(srcdir)/pbm-figures.mk, regen-pbm-figures-mk)
+ ($(srcdir)/pgm-figures.mk, regen-pgm-figures-mk)
+ ($(srcdir)/ppm-figures.mk, regen-ppm-figures-mk):
+ Remove rules.
+ (EXTRA_DIST): Add $(FIGURES).
+ Remove $(PBM_FIGURES), $(PGM_FIGURES) and $(PPM_FIGURES).
+ * doc/pbm-figures.mk,
+ * doc/pgm-figures.mk,
+ * doc/ppm-figures.mk:
+ Remove.
+
+2010-03-22 Roland Levillain <roland(a)lrde.epita.fr>
+
Rework doc/gen-figures-mk a bit.
* doc/gen-figures-mk (gen_var): New function.
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index b36ad89..54342e8 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -102,10 +102,7 @@ $(srcdir)/figures.mk: $(srcdir)/gen-figures-mk
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
-# thanks to PBM_FIGURES, PGM_FIGURES and PPM_FIGURES. However, these
-# variables may be removed someday (see FIXME below).
+EXTRA_DIST += $(FIGURES)
MAINTAINERCLEANFILES = $(FIGURES)
.PHONY: regen-figures-mk
@@ -115,82 +112,11 @@ regen-figures-mk:
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)
+# ------------- #
+# PNG figures. #
+# ------------- #
-# ----- #
-# PBM. #
-# ----- #
-
-$(srcdir)/pbm-figures.mk: $(srcdir)/gen-make-variable
- rm -f $@.tmp
- $(srcdir)/gen-make-variable PBM_FIGURES \
- `find $(srcdir)/figures/*.pbm | sed 's,^$(srcdir),\$$(srcdir),'` \
- >$@.tmp
- mv -f $@.tmp $@
- chmod -w $@
-include $(srcdir)/pbm-figures.mk
-EXTRA_DIST += $(PBM_FIGURES)
-
-.PHONY: regen-pbm-figures-mk
-regen-pbm-figures-mk:
- rm -f $(srcdir)/pbm-figures.mk.tmp
- $(srcdir)/gen-make-variable PBM_FIGURES \
- `find $(srcdir)/figures/*.pbm | sed 's,^$(srcdir),\$$(srcdir),'` \
- >$(srcdir)/pbm-figures.mk.tmp
- mv -f $(srcdir)/pbm-figures.mk.tmp $(srcdir)/pbm-figures.mk
- chmod -w $(srcdir)/pbm-figures.mk
-
-# ----- #
-# PGM. #
-# ----- #
-
-$(srcdir)/pgm-figures.mk: $(srcdir)/gen-make-variable
- rm -f $@.tmp
- $(srcdir)/gen-make-variable PGM_FIGURES \
- `find $(srcdir)/figures/*.pgm | sed 's,^$(srcdir),\$$(srcdir),'` \
- >$@.tmp
- mv -f $@.tmp $@
- chmod -w $@
-include $(srcdir)/pgm-figures.mk
-EXTRA_DIST += $(PGM_FIGURES)
-
-.PHONY: regen-pgm-figures-mk
-regen-pgm-figures-mk:
- rm -f $(srcdir)/pgm-figures.mk.tmp
- $(srcdir)/gen-make-variable PGM_FIGURES \
- `find $(srcdir)/figures/*.pgm | sed 's,^$(srcdir),\$$(srcdir),'` \
- >$(srcdir)/pgm-figures.mk.tmp
- mv -f $(srcdir)/pgm-figures.mk.tmp $(srcdir)/pgm-figures.mk
- chmod -w $(srcdir)/pgm-figures.mk
-
-# ----- #
-# PPM. #
-# ----- #
-
-$(srcdir)/ppm-figures.mk: $(srcdir)/gen-make-variable
- rm -f $@.tmp
- $(srcdir)/gen-make-variable PPM_FIGURES \
- `find $(srcdir)/figures/*.ppm | sed 's,^$(srcdir),\$$(srcdir),'` \
- >$@.tmp
- mv -f $@.tmp $@
- chmod -w $@
-include $(srcdir)/ppm-figures.mk
-EXTRA_DIST += $(PPM_FIGURES)
-
-.PHONY: regen-ppm-figures-mk
-regen-ppm-figures-mk:
- rm -f $(srcdir)/ppm-figures.mk.tmp
- $(srcdir)/gen-make-variable PPM_FIGURES \
- `find $(srcdir)/figures/*.ppm | sed 's,^$(srcdir),\$$(srcdir),'` \
- >$(srcdir)/ppm-figures.mk.tmp
- mv -f $(srcdir)/ppm-figures.mk.tmp $(srcdir)/ppm-figures.mk
- chmod -w $(srcdir)/ppm-figures.mk
-
-# ----- #
-# PNG. #
-# ----- #
+# PNG figures are generated from PBM, PGM and PPM figures.
convert_to_png = convert -scale 250 -bordercolor black -border 2x2
@@ -212,6 +138,14 @@ PNG_FIGURES = \
EXTRA_DIST += $(PNG_FIGURES)
MAINTAINERCLEANFILES += $(PNG_FIGURES)
+# --------------- #
+# Other figures. #
+# --------------- #
+
+# This image seems to be used nowhere.
+MORE_FIGURES = figures/accu_image_morpher_big_picture.pdf
+EXTRA_DIST += $(MORE_FIGURES)
+
## ---------- ##
## Examples. ##
diff --git a/milena/doc/figures.mk b/milena/doc/figures.mk
index 4dce4cd..c3e72f1 100644
--- a/milena/doc/figures.mk
+++ b/milena/doc/figures.mk
@@ -145,3 +145,44 @@ FIGURES = \
$(TUTO3_COLORIZE_FIGURES) \
$(TUTO3_RW_IMAGE_FIGURES) \
$(TUTO4_GENERICITY_AND_ALGORITHMS_FIGURES)
+
+# The list of all generated PBM figures.
+PBM_FIGURES = \
+ $(srcdir)/figures/fill-subdomain-1.pbm \
+ $(srcdir)/figures/ima_save.pbm \
+ $(srcdir)/figures/labeling-compute-1.pbm \
+ $(srcdir)/figures/logical-not-1.pbm \
+ $(srcdir)/figures/logical-not-2.pbm \
+ $(srcdir)/figures/logical-not-3.pbm \
+ $(srcdir)/figures/tuto2_first_image-1.pbm \
+ $(srcdir)/figures/tuto4_genericity_and_algorithms-3.pbm
+
+# The list of all generated PGM figures.
+PGM_FIGURES = \
+ $(srcdir)/figures/tuto3_colorize-1.pgm
+
+# The list of all generated PPM figures.
+PPM_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 \
+ $(srcdir)/figures/fill-1.ppm \
+ $(srcdir)/figures/fill-2.ppm \
+ $(srcdir)/figures/fill-imageif-cfun-1.ppm \
+ $(srcdir)/figures/fill-subdomain-2.ppm \
+ $(srcdir)/figures/fill-subdomain-3.ppm \
+ $(srcdir)/figures/fill-subdomain-4.ppm \
+ $(srcdir)/figures/ima2d-rot-1.ppm \
+ $(srcdir)/figures/ima2d-rot-2.ppm \
+ $(srcdir)/figures/labeling-compute-2.ppm \
+ $(srcdir)/figures/tuto3_colorize-2.ppm \
+ $(srcdir)/figures/tuto3_rw_image-1.ppm \
+ $(srcdir)/figures/tuto3_rw_image-2.ppm \
+ $(srcdir)/figures/tuto3_rw_image-3.ppm \
+ $(srcdir)/figures/tuto4_genericity_and_algorithms-1.ppm \
+ $(srcdir)/figures/tuto4_genericity_and_algorithms-2.ppm \
+ $(srcdir)/figures/tuto4_genericity_and_algorithms-4.ppm \
+ $(srcdir)/figures/tuto4_genericity_and_algorithms-5.ppm \
+ $(srcdir)/figures/tuto4_genericity_and_algorithms-6.ppm
diff --git a/milena/doc/gen-figures-mk b/milena/doc/gen-figures-mk
index a566cee..ca20fc9 100755
--- a/milena/doc/gen-figures-mk
+++ b/milena/doc/gen-figures-mk
@@ -102,6 +102,14 @@ gen_var()
done
} | backslashify
}
+
+# List of paths to PBM figures.
+pbm_fig_paths=
+# List of paths to PGM figures.
+pgg_fig_paths=
+# List of paths to PPM figures.
+ppm_fig_paths=
+
cat<<EOF
## Generated by $me. Do not edit by hand.
@@ -134,6 +142,16 @@ for file in `inputs`; do
# Populate the list of variables of figures.
fig_vars="$fig_vars \$($fig_var)"
+ # Populate the list of paths to figures of a given format.
+ for figure in $figures; do
+ fig_path=" \$(srcdir)/figures/$figure"
+ case "$figure" in
+ *.pbm) pbm_fig_paths="$pbm_fig_paths $fig_path";;
+ *.pgm) pgm_fig_paths="$pgm_fig_paths $fig_path";;
+ *.ppm) ppm_fig_paths="$ppm_fig_paths $fig_path";;
+ esac
+ done
+
# Generate a Make variable for the figures produced by FILE.
{
echo "$fig_var ="
@@ -160,6 +178,15 @@ EOF
done
-# Output the list of figures.
+# More Make variables.
echo "# The list of all generated figures."
gen_var FIGURES $fig_vars
+echo
+echo "# The list of all generated PBM figures."
+gen_var PBM_FIGURES $pbm_fig_paths
+echo
+echo "# The list of all generated PGM figures."
+gen_var PGM_FIGURES $pgm_fig_paths
+echo
+echo "# The list of all generated PPM figures."
+gen_var PPM_FIGURES $ppm_fig_paths
diff --git a/milena/doc/pbm-figures.mk b/milena/doc/pbm-figures.mk
deleted file mode 100644
index dd061a5..0000000
--- a/milena/doc/pbm-figures.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-## Generated by gen-make-variable. Do not edit by hand.
-
-PBM_FIGURES = \
- $(srcdir)/figures/fill-subdomain-1.pbm \
- $(srcdir)/figures/ima_save.pbm \
- $(srcdir)/figures/labeling-compute-1.pbm \
- $(srcdir)/figures/logical-not-1.pbm \
- $(srcdir)/figures/logical-not-2.pbm \
- $(srcdir)/figures/logical-not-3.pbm \
- $(srcdir)/figures/tuto2_first_image-1.pbm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-3.pbm
diff --git a/milena/doc/pgm-figures.mk b/milena/doc/pgm-figures.mk
deleted file mode 100644
index b65d78f..0000000
--- a/milena/doc/pgm-figures.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-## Generated by gen-make-variable. Do not edit by hand.
-
-PGM_FIGURES = \
- $(srcdir)/figures/tuto3_colorize-1.pgm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-7.pgm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-8.pgm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-9.pgm
diff --git a/milena/doc/ppm-figures.mk b/milena/doc/ppm-figures.mk
deleted file mode 100644
index 25b9033..0000000
--- a/milena/doc/ppm-figures.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-## Generated by gen-make-variable. Do not edit by hand.
-
-PPM_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 \
- $(srcdir)/figures/fill-1.ppm \
- $(srcdir)/figures/fill-2.ppm \
- $(srcdir)/figures/fill-imageif-cfun-1.ppm \
- $(srcdir)/figures/fill-subdomain-2.ppm \
- $(srcdir)/figures/fill-subdomain-3.ppm \
- $(srcdir)/figures/fill-subdomain-4.ppm \
- $(srcdir)/figures/ima2d-rot-1.ppm \
- $(srcdir)/figures/ima2d-rot-2.ppm \
- $(srcdir)/figures/labeling-compute-2.ppm \
- $(srcdir)/figures/tuto3_colorize-2.ppm \
- $(srcdir)/figures/tuto3_rw_image-1.ppm \
- $(srcdir)/figures/tuto3_rw_image-2.ppm \
- $(srcdir)/figures/tuto3_rw_image-3.ppm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-1.ppm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-2.ppm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-4.ppm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-5.ppm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-6.ppm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-7.ppm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-8.ppm \
- $(srcdir)/figures/tuto4_genericity_and_algorithms-9.ppm
--
1.5.6.5