
* doc/figures.mk (EXTEND_FIGURES) (FILL_FIGURES) (FILL_SUBDOMAIN_FIGURES) (FILL_IMAGEIF_CFUN_FIGURES) (IMA2D_ROT_FIGURES) (IMA_SAVE_FIGURES) (LABELING_COMPUTE_FIGURES) (LOGICAL_NOT_FIGURES) (TUTO2_FIRST_IMAGE_FIGURES) (TUTO3_COLORIZE_FIGURES) (TUTO3_RW_IMAGE_FIGURES) (TUTO4_GENERICITY_AND_ALGORITHMS_FIGURES): New variables. Use them to simplify rules. (FIGURES): New variable. * doc/Makefile.am (MAINTAINERCLEANFILES): Add $(FIGURES). --- milena/ChangeLog | 22 +++++++++++++ milena/doc/Makefile.am | 12 +++++-- milena/doc/figures.mk | 79 ++++++++++++++++++++++++++++++++++++++++------- 3 files changed, 98 insertions(+), 15 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 1518c1a..dff8465 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,27 @@ 2010-03-18 Roland Levillain <roland@lrde.epita.fr> + Have ``make maintainer-clean'' remove generated figures in doc/. + + * doc/figures.mk + (EXTEND_FIGURES) + (FILL_FIGURES) + (FILL_SUBDOMAIN_FIGURES) + (FILL_IMAGEIF_CFUN_FIGURES) + (IMA2D_ROT_FIGURES) + (IMA_SAVE_FIGURES) + (LABELING_COMPUTE_FIGURES) + (LOGICAL_NOT_FIGURES) + (TUTO2_FIRST_IMAGE_FIGURES) + (TUTO3_COLORIZE_FIGURES) + (TUTO3_RW_IMAGE_FIGURES) + (TUTO4_GENERICITY_AND_ALGORITHMS_FIGURES): + New variables. + Use them to simplify rules. + (FIGURES): New variable. + * doc/Makefile.am (MAINTAINERCLEANFILES): Add $(FIGURES). + +2010-03-18 Roland Levillain <roland@lrde.epita.fr> + Generate the list of split outputs in the documentation. * doc/Makefile.am ($(srcdir)/split-outputs.mk): New rule. diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am index d2b6300..5d71933 100644 --- a/milena/doc/Makefile.am +++ b/milena/doc/Makefile.am @@ -94,6 +94,14 @@ DOC_PACKAGES = doxyfuns.sty milena.sty ## Figures. ## ## --------- ## +# Generated figures. +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). +MAINTAINERCLEANFILES = $(FIGURES) + # ----- # # PBM. # # ----- # @@ -185,7 +193,7 @@ PNG_FIGURES = \ $(PGM_FIGURES:.pgm=.png) \ $(PPM_FIGURES:.ppm=.png) EXTRA_DIST += $(PNG_FIGURES) -MAINTAINERCLEANFILES = $(PNG_FIGURES) +MAINTAINERCLEANFILES += $(PNG_FIGURES) ## ---------- ## @@ -903,8 +911,6 @@ regen-examples-outputs-mk: mv -f $(srcdir)/examples-outputs.mk.tmp $(srcdir)/examples-outputs.mk chmod -w $(srcdir)/examples-outputs.mk -include $(srcdir)/figures.mk - ## --------------- ## ## Split outputs. ## ## --------------- ## diff --git a/milena/doc/figures.mk b/milena/doc/figures.mk index 3519e3f..d4a9263 100644 --- a/milena/doc/figures.mk +++ b/milena/doc/figures.mk @@ -25,86 +25,141 @@ ## outputs (as a side effect) or at least if the extraction of this ## list from the source file was straightforward. -$(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)/examples/extend.stamp +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 $@ @if test -f $@; then :; else \ rm -f $<; \ $(MAKE) $(AM_MAKEFLAGS) $<; \ fi -$(srcdir)/figures/fill-1.ppm $(srcdir)/figures/fill-2.ppm: $(srcdir)/examples/fill.stamp +FILL_FIGURES = \ + $(srcdir)/figures/fill-1.ppm \ + $(srcdir)/figures/fill-2.ppm +$(FILL_FIGURES): $(srcdir)/examples/fill.stamp ## Recover from the removal of $@ @if test -f $@; then :; else \ rm -f $<; \ $(MAKE) $(AM_MAKEFLAGS) $<; \ fi -$(srcdir)/figures/fill-subdomain-1.pbm $(srcdir)/figures/fill-subdomain-2.ppm $(srcdir)/figures/fill-subdomain-3.ppm $(srcdir)/figures/fill-subdomain-4.ppm: $(srcdir)/examples/fill-subdomain.stamp +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 $@ @if test -f $@; then :; else \ rm -f $<; \ $(MAKE) $(AM_MAKEFLAGS) $<; \ fi -$(srcdir)/figures/fill-imageif-cfun-1.ppm: $(srcdir)/examples/fill-imageif-cfun.stamp +FILL_IMAGEIF_CFUN_FIGURES = $(srcdir)/figures/fill-imageif-cfun-1.ppm +$(FILL_IMAGEIF_CFUN_FIGURES): $(srcdir)/examples/fill-imageif-cfun.stamp ## Recover from the removal of $@ @if test -f $@; then :; else \ rm -f $<; \ $(MAKE) $(AM_MAKEFLAGS) $<; \ fi -$(srcdir)/figures/ima2d-rot-1.ppm $(srcdir)/figures/ima2d-rot-2.ppm: $(srcdir)/examples/ima2d-rot.stamp +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 $@ @if test -f $@; then :; else \ rm -f $<; \ $(MAKE) $(AM_MAKEFLAGS) $<; \ fi -$(srcdir)/figures/ima_save.pbm: $(srcdir)/examples/ima-save.stamp +IMA_SAVE_FIGURES = $(srcdir)/figures/ima_save.pbm +$(IMA_SAVE_FIGURES): $(srcdir)/examples/ima-save.stamp ## Recover from the removal of $@ @if test -f $@; then :; else \ rm -f $<; \ $(MAKE) $(AM_MAKEFLAGS) $<; \ fi -$(srcdir)/figures/labeling-compute-1.pbm $(srcdir)/figures/labeling-compute-2.ppm: $(srcdir)/examples/labeling-compute.stamp +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 $@ @if test -f $@; then :; else \ rm -f $<; \ $(MAKE) $(AM_MAKEFLAGS) $<; \ fi -$(srcdir)/figures/logical-not-1.pbm $(srcdir)/figures/logical-not-2.pbm $(srcdir)/figures/logical-not-3.pbm: $(srcdir)/examples/logical-not.stamp +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 $@ @if test -f $@; then :; else \ rm -f $<; \ $(MAKE) $(AM_MAKEFLAGS) $<; \ fi -$(srcdir)/figures/tuto2_first_image-1.pbm: $(srcdir)/examples/tuto2_first_image.stamp +TUTO2_FIRST_IMAGE_FIGURES = $(srcdir)/figures/tuto2_first_image-1.pbm +$(TUTO2_FIRST_IMAGE_FIGURES): $(srcdir)/examples/tuto2_first_image.stamp ## Recover from the removal of $@ @if test -f $@; then :; else \ rm -f $<; \ $(MAKE) $(AM_MAKEFLAGS) $<; \ fi -$(srcdir)/figures/tuto3_colorize-1.pgm $(srcdir)/figures/tuto3_colorize-2.ppm: $(srcdir)/examples/tuto3/colorize.stamp +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 $@ @if test -f $@; then :; else \ rm -f $<; \ $(MAKE) $(AM_MAKEFLAGS) $<; \ fi -$(srcdir)/figures/tuto3_rw_image-1.ppm $(srcdir)/figures/tuto3_rw_image-3.ppm: $(srcdir)/examples/tuto3_rw_image.stamp +TUTO3_RW_IMAGE_FIGURES = \ + $(srcdir)/figures/tuto3_rw_image-1.ppm \ + $(srcdir)/figures/tuto3_rw_image-3.ppm +$(TUTO3_RW_IMAGE_FIGURES): $(srcdir)/examples/tuto3_rw_image.stamp ## Recover from the removal of $@ @if test -f $@; then :; else \ rm -f $<; \ $(MAKE) $(AM_MAKEFLAGS) $<; \ fi -$(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: $(srcdir)/examples/tuto4_genericity_and_algorithms.stamp +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 $@ @if test -f $@; then :; else \ rm -f $<; \ $(MAKE) $(AM_MAKEFLAGS) $<; \ fi + +# The list of all generated figures. +FIGURES = \ + $(EXTEND_FIGURES) \ + $(FILL_FIGURES) \ + $(FILL_SUBDOMAIN_FIGURES) \ + $(FILL_IMAGEIF_CFUN_FIGURES) \ + $(IMA2D_ROT_FIGURES) \ + $(IMA_SAVE_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