[Telepathy-commits] [telepathy-doc/master] Don't regenerate PNGs from SVGs unless required
Davyd Madeley
davyd at madeley.id.au
Thu Mar 5 22:28:03 PST 2009
Add figures-png as a dep for `make html`.
Append generated figures to .gitignore so they don't appear in the status.
---
docs/book/.gitignore | 3 +++
docs/book/Makefile.am | 2 +-
docs/generate-figures.make | 11 ++++++-----
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/docs/book/.gitignore b/docs/book/.gitignore
index 632bedd..2c71359 100644
--- a/docs/book/.gitignore
+++ b/docs/book/.gitignore
@@ -1,3 +1,6 @@
Makefile
Makefile.in
/html/
+C/figures/telepathy-architecture-overview.png
+C/figures/bus-conceptual.png
+C/figures/bus-hierarchy-conceptual.png
diff --git a/docs/book/Makefile.am b/docs/book/Makefile.am
index 361fc9f..b9ded7c 100644
--- a/docs/book/Makefile.am
+++ b/docs/book/Makefile.am
@@ -60,7 +60,7 @@ xslt/db2html.xsl: xslt/db2html.xsl.in
#
# We set refentry.generate.name and refentry.generate.title to get the title
# instead of "Name" as the title.
-html/index.html: $(MAIN) Makefile.am $(DOCBOOK_STYLESHEET)
+html/index.html: $(MAIN) Makefile.am $(DOCBOOK_STYLESHEET) $(DOC_FIGURES) figures-png
rm -rf html
$(mkinstalldirs) html
cp -r ../examples/ html/
diff --git a/docs/generate-figures.make b/docs/generate-figures.make
index 0d301b4..283a2cc 100644
--- a/docs/generate-figures.make
+++ b/docs/generate-figures.make
@@ -3,10 +3,11 @@
# FIXME - is this already defined?
FIGURES_DIR = C/figures
-%.svg.png:
- inkscape -z -e \
- $(FIGURES_DIR)/$(patsubst %.svg.png,%.png,$@) \
- $(FIGURES_DIR)/src/$(patsubst %.svg.png,%.svg,$@)
+$(FIGURES_DIR)/%.png: $(FIGURES_DIR)/src/%.svg
+ inkscape -z -e $@ $<
+ grep -qx -- $@ .gitignore || echo $@ >> .gitignore
+
+SVG_FILES = $(patsubst %.svg,$(FIGURES_DIR)/src/%.svg,$(DOC_FIGURES_SRC))
+PNG_FILES = $(patsubst %.svg,$(FIGURES_DIR)/%.png,$(DOC_FIGURES_SRC))
-PNG_FILES = $(addsuffix .png,$(DOC_FIGURES_SRC))
figures-png: $(PNG_FILES)
--
1.5.6.5
More information about the telepathy-commits
mailing list