diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-02-28 00:17:16 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-16 14:53:17 +0100 |
commit | ca9104dcb4a9d84f6fb224510f17bb24e3d823a8 (patch) | |
tree | 92a10583075bf69425bd39467f80783078d2eec3 | |
parent | e26f6ef1769349cdfa81b4265b35f514559ca16c (diff) |
build: generate PNG files automatically from DIA files
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | docs/reference/api/Makefile.am | 22 | ||||
-rw-r--r-- | docs/reference/api/ModemManager-states.png | bin | 28305 -> 0 bytes |
4 files changed, 29 insertions, 2 deletions
@@ -85,6 +85,7 @@ docs/reference/api/*.txt docs/reference/api/html docs/reference/api/tmpl docs/reference/api/xml +docs/reference/api/*.png docs/man/ModemManager.8 diff --git a/configure.ac b/configure.ac index 0d22e378..1f65ae27 100644 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,14 @@ AC_ARG_WITH(docs, AS_HELP_STRING([--with-docs], [Build ModemManager documentatio AM_CONDITIONAL(WITH_DOCS, test "x$with_docs" = "xyes") case $with_docs in yes) + # Check for dia if we are building gtk_doc + AC_PATH_PROG(DIA, dia) + AC_SUBST(DIA) + + if test -z "$DIA"; then + AC_MSG_ERROR([Could not find Dia tool required to build documentation.]) + fi + enable_gtk_doc=yes ;; *) diff --git a/docs/reference/api/Makefile.am b/docs/reference/api/Makefile.am index ea657d75..bdb15ce0 100644 --- a/docs/reference/api/Makefile.am +++ b/docs/reference/api/Makefile.am @@ -1,4 +1,16 @@ +# Generation of the additional PNG files from DIA files +# (list of original '.dia' files with '.png' extension) +DIAGRAMS = \ + ModemManager-states.dia + +# The wanted PNG files +DIAGRAMS_PNG = $(notdir $(DIAGRAMS:.dia=.png)) + +# DIA to PNG conversion +$(DIAGRAMS_PNG): $(DIAGRAMS) + $(AM_V_GEN) $(DIA) -t png $^ 1>/dev/null 2>&1 + # The name of the module. DOC_MODULE = mm @@ -41,7 +53,10 @@ HTML_IMAGES = \ ModemManager-states.png \ $(NULL) +# Note that PNG files are also added in content_files so that +# the documentation is not built before the PNGs. content_files = \ + $(HTML_IMAGES) \ $(NULL) expand_content_files = \ @@ -76,8 +91,7 @@ EXTRA_DIST += \ mm-overview.xml \ mm-dbus-reference.xml \ version.xml.in \ - ModemManager-states.dia \ - ModemManager-states.png \ + $(DIAGRAMS) \ $(NULL) CLEANFILES += \ @@ -96,3 +110,7 @@ CLEANFILES += \ *.stamp \ -rf xml html tmpl \ $(NULL) + +# PNGs generated are removed only in maintainer-clean +MAINTAINERCLEANFILES = \ + $(DIAGRAMS_PNG) diff --git a/docs/reference/api/ModemManager-states.png b/docs/reference/api/ModemManager-states.png Binary files differdeleted file mode 100644 index 9ac1529a..00000000 --- a/docs/reference/api/ModemManager-states.png +++ /dev/null |