build: generate PNG files automatically from DIA files
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -85,6 +85,7 @@ docs/reference/api/*.txt
|
|||||||
docs/reference/api/html
|
docs/reference/api/html
|
||||||
docs/reference/api/tmpl
|
docs/reference/api/tmpl
|
||||||
docs/reference/api/xml
|
docs/reference/api/xml
|
||||||
|
docs/reference/api/*.png
|
||||||
|
|
||||||
docs/man/ModemManager.8
|
docs/man/ModemManager.8
|
||||||
|
|
||||||
|
@@ -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")
|
AM_CONDITIONAL(WITH_DOCS, test "x$with_docs" = "xyes")
|
||||||
case $with_docs in
|
case $with_docs in
|
||||||
yes)
|
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
|
enable_gtk_doc=yes
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@@ -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.
|
# The name of the module.
|
||||||
DOC_MODULE = mm
|
DOC_MODULE = mm
|
||||||
|
|
||||||
@@ -41,7 +53,10 @@ HTML_IMAGES = \
|
|||||||
ModemManager-states.png \
|
ModemManager-states.png \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
# Note that PNG files are also added in content_files so that
|
||||||
|
# the documentation is not built before the PNGs.
|
||||||
content_files = \
|
content_files = \
|
||||||
|
$(HTML_IMAGES) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
expand_content_files = \
|
expand_content_files = \
|
||||||
@@ -76,8 +91,7 @@ EXTRA_DIST += \
|
|||||||
mm-overview.xml \
|
mm-overview.xml \
|
||||||
mm-dbus-reference.xml \
|
mm-dbus-reference.xml \
|
||||||
version.xml.in \
|
version.xml.in \
|
||||||
ModemManager-states.dia \
|
$(DIAGRAMS) \
|
||||||
ModemManager-states.png \
|
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
CLEANFILES += \
|
CLEANFILES += \
|
||||||
@@ -96,3 +110,7 @@ CLEANFILES += \
|
|||||||
*.stamp \
|
*.stamp \
|
||||||
-rf xml html tmpl \
|
-rf xml html tmpl \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
# PNGs generated are removed only in maintainer-clean
|
||||||
|
MAINTAINERCLEANFILES = \
|
||||||
|
$(DIAGRAMS_PNG)
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 28 KiB |
Reference in New Issue
Block a user