mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-06 16:21:50 +00:00
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
This commit is contained in:
parent
41ed42d5ba
commit
a80ba4ea09
14
Makefile.am
14
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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -101,6 +101,4 @@ CLEANFILES += html/* tmpl/* xml/* \
|
|||
NetworkManager-sections.txt \
|
||||
NetworkManager-overrides.txt
|
||||
|
||||
if BUILD_SETTING_DOCS
|
||||
CLEANFILES += settings-spec.xml
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue