build: do not require GTK-Doc to build nmcli

We can simply check for xsltproc and depend on pygobject and
introspection.

https://bugzilla.gnome.org/show_bug.cgi?id=775003
This commit is contained in:
Emmanuele Bassi 2016-11-24 17:04:33 +00:00 committed by Thomas Haller
parent b08dd30b09
commit 41ed42d5ba
2 changed files with 8 additions and 12 deletions

View File

@ -3004,7 +3004,7 @@ endif
clients_cli_settings_doc_c = clients/cli/settings-docs.c
if BUILD_SETTING_DOCS
$(clients_cli_settings_doc_c): clients/cli/settings-docs.xsl libnm/nm-property-docs.xml
$(AM_V_GEN) xsltproc --output $@ $^
$(AM_V_GEN) $(XSLTPROC) --output $@ $^
DISTCLEANFILES += $(clients_cli_settings_doc_c)
else
$(clients_cli_settings_doc_c):
@ -3898,7 +3898,7 @@ xsltproc_flags = \
if ENABLE_GTK_DOC
man/%.1 man/%.5 man/%.7 man/%.8: man/%.xml man/common.ent
$(AM_V_GEN) xsltproc --output $@ $(xsltproc_flags) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
$(AM_V_GEN) $(XSLTPROC) --output $@ $(xsltproc_flags) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
endif
@ -3910,7 +3910,7 @@ man_nm_settings_xml = \
if BUILD_SETTING_DOCS
man/nm-setting%.xml: man/nm-setting%.xsl libnm/nm-setting%-docs.xml
$(AM_V_GEN) xsltproc --output $@ $(xsltproc_flags) $^
$(AM_V_GEN) $(XSLTPROC) --output $@ $(xsltproc_flags) $^
CLEANFILES += $(man_nm_settings_xml)

View File

@ -1101,26 +1101,22 @@ fi
AM_CONDITIONAL(INSTALL_PREGEN_MANPAGES, test "x${install_pregen_manpages}" = "xyes")
# check if we can build setting property documentation
if test -n "$INTROSPECTION_MAKEFILE" -a "$enable_gtk_doc" = "yes"; then
if test -n "$INTROSPECTION_MAKEFILE"; then
# If g-i is installed we know we have python, but we might not have pygobject
if ! python -c 'from gi.repository import GObject' >& /dev/null; then
AC_MSG_ERROR(["--enable-gtk-doc --with-introspection" aims to build the settings documentation. This requires GObject introspection for python (pygobject)])
AC_MSG_ERROR(["--enable-introspection aims to build the settings documentation. This requires GObject introspection for python (pygobject)])
fi
# gtk-doc depends on perl, but we can check for it anyway
AC_PATH_PROG(PERL, perl, no)
AC_PATH_PROG(XSLTPROC, xsltproc, no)
have_introspection=yes
build_setting_docs=yes
else
have_introspection=no
build_setting_docs=no
fi
if test -n "$INTROSPECTION_MAKEFILE"; then
have_introspection=yes
else
have_introspection=no
fi
# check for pre-built setting docs
if test "$build_setting_docs" != "yes" \
-a -f man/nm-settings.xml \