summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-11-28 12:42:04 +0100
committerThomas Haller <thaller@redhat.com>2016-11-28 12:43:51 +0100
commita80ba4ea09003672cc3070cd82f549ba64728866 (patch)
tree7a518566280c47820208d326d28a5bf3d7695689
parent41ed42d5ba51e2e1294078e582df16252e13d4e7 (diff)
downloadNetworkManager-a80ba4ea09003672cc3070cd82f549ba64728866.tar.gz
build: fix gtk-doc/introspection handling for build
- `make dist` requires --enable-gtk-doc --enable-introspection --with-libnm-glib - --enable-gtk-doc requires --enable-introspection - --with-nmcli requires either --enable-introspection or pregenerated settings-docs.c files from the dist tarball. It does not require --enable-gtk-doc. There is a bit of a problem in that --enable-introspection requires now xsltproc. However, gobject-introspection does itself not depend on xsltproc. So, more correct might be a special --enable-doc argument, that combines --enable-introspection --with-xsltproc. Anyway, that seems to make it more complicated then it already is so just implicitly (and surprisingly?) require xsltproc with --enable-introspection. https://bugzilla.gnome.org/show_bug.cgi?id=775003
-rw-r--r--Makefile.am14
-rwxr-xr-xautogen.sh2
-rw-r--r--configure.ac11
-rwxr-xr-xcontrib/fedora/rpm/build_clean.sh2
-rw-r--r--docs/api/Makefile.am2
5 files changed, 18 insertions, 13 deletions
diff --git a/Makefile.am b/Makefile.am
index 5de421062d..e207d373f9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -126,7 +126,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
--enable-ifnet
dist-configure-check:
- @echo "*** 'make dist' requires '--enable-gtk-doc --with-introspection --with-libnm-glib'. ***"
+ @echo "*** 'make dist' requires '--enable-gtk-doc --enable-introspection --with-libnm-glib'. ***"
@false
if !BUILD_SETTING_DOCS
dist_configure_check += dist-configure-check
@@ -842,7 +842,7 @@ libnm/libnm.typelib: libnm/libnm.gir
INTROSPECTION_GIRS += libnm/NM-1.0.gir
endif
-if BUILD_SETTING_DOCS
+if HAVE_INTROSPECTION
libnm_noinst_data = \
libnm/nm-property-docs.xml \
@@ -3002,13 +3002,13 @@ endif
clients_cli_settings_doc_c = clients/cli/settings-docs.c
-if BUILD_SETTING_DOCS
+if HAVE_INTROSPECTION
$(clients_cli_settings_doc_c): clients/cli/settings-docs.xsl libnm/nm-property-docs.xml
$(AM_V_GEN) $(XSLTPROC) --output $@ $^
DISTCLEANFILES += $(clients_cli_settings_doc_c)
else
$(clients_cli_settings_doc_c):
- @echo "to generate $(clients_cli_settings_doc_c), configure with --enable-gtk-doc"
+ @echo "to generate $(clients_cli_settings_doc_c), configure with --enable-introspection"
@echo "alternatively, build --without-nmcli"
@false
endif
@@ -3895,7 +3895,7 @@ xsltproc_flags = \
--stringparam man.authors.section.enabled 0 \
--stringparam man.copyright.section.enabled 0
-if ENABLE_GTK_DOC
+if HAVE_INTROSPECTION
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 $<
@@ -3907,7 +3907,7 @@ man_nm_settings_xml = \
man/nm-settings-keyfile.xml \
man/nm-settings-ifcfg-rh.xml
-if BUILD_SETTING_DOCS
+if HAVE_INTROSPECTION
man/nm-setting%.xml: man/nm-setting%.xsl libnm/nm-setting%-docs.xml
$(AM_V_GEN) $(XSLTPROC) --output $@ $(xsltproc_flags) $^
@@ -3963,7 +3963,7 @@ uninstall-hook-man:
uninstall_hook += uninstall-hook-man
-if ENABLE_GTK_DOC
+if HAVE_INTROSPECTION
install_manpages = true
man_MANS += $(man_pages)
CLEANFILES += $(man_pages)
diff --git a/autogen.sh b/autogen.sh
index 73503638fa..9bb0294888 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -28,5 +28,5 @@ AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
cd $olddir
if test -z "$NOCONFIGURE"; then
- exec $srcdir/configure --enable-maintainer-mode --enable-more-warnings=error --enable-gtk-doc --with-introspection "$@"
+ exec $srcdir/configure --enable-maintainer-mode --enable-more-warnings=error --enable-gtk-doc --enable-introspection "$@"
fi
diff --git a/configure.ac b/configure.ac
index fcbc758cb6..0d9742814b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1101,6 +1101,7 @@ fi
AM_CONDITIONAL(INSTALL_PREGEN_MANPAGES, test "x${install_pregen_manpages}" = "xyes")
# check if we can build setting property documentation
+build_setting_docs=no
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
@@ -1111,10 +1112,16 @@ if test -n "$INTROSPECTION_MAKEFILE"; then
AC_PATH_PROG(XSLTPROC, xsltproc, no)
have_introspection=yes
- build_setting_docs=yes
+ if test "$enable_gtk_doc" = "yes"; then
+ build_setting_docs=yes
+ fi
else
+ if test "$enable_gtk_doc" = "yes"; then
+ # large parts of the documentation require introspection/pygobject to extract
+ # the documentation out of the source files. You cannot enable gtk-doc without alone.
+ AC_MSG_ERROR(["--with-gtk-doc requires --enable-introspection"])
+ fi
have_introspection=no
- build_setting_docs=no
fi
# check for pre-built setting docs
diff --git a/contrib/fedora/rpm/build_clean.sh b/contrib/fedora/rpm/build_clean.sh
index 71e63a90eb..9c66b023aa 100755
--- a/contrib/fedora/rpm/build_clean.sh
+++ b/contrib/fedora/rpm/build_clean.sh
@@ -110,7 +110,7 @@ if [[ $IGNORE_DIRTY != 1 ]]; then
fi
if [[ $NO_DIST != 1 ]]; then
- ./autogen.sh --enable-gtk-doc --with-introspection --with-libnm-glib || die "Error autogen.sh"
+ ./autogen.sh --enable-gtk-doc --enable-introspection --with-libnm-glib || die "Error autogen.sh"
if [[ $QUICK == 1 ]]; then
make dist -j 7 || die "Error make dist"
else
diff --git a/docs/api/Makefile.am b/docs/api/Makefile.am
index d2677d7a9e..46d8569aa5 100644
--- a/docs/api/Makefile.am
+++ b/docs/api/Makefile.am
@@ -101,6 +101,4 @@ CLEANFILES += html/* tmpl/* xml/* \
NetworkManager-sections.txt \
NetworkManager-overrides.txt
-if BUILD_SETTING_DOCS
CLEANFILES += settings-spec.xml
-endif