2011-02-16 16:24:16 -06:00
|
|
|
AUTOMAKE_OPTIONS = 1.7
|
|
|
|
|
|
|
|
|
|
XSLTPROC = xsltproc --xinclude --nonet
|
|
|
|
|
XMLS = $(wildcard $(top_srcdir)/introspection/nm-*.xml)
|
|
|
|
|
|
2016-03-26 10:17:34 +01:00
|
|
|
GENERATED_FILES =
|
2014-06-27 12:25:54 -04:00
|
|
|
|
build: combine handling of setting docs and man pages
Building the man pages via xsltproc requires "docbook.xsl"
which is part of docbook.
Previously, we would build the man pages solely based on
"--enable-introspection", which checks for the presence of
xsltproc, but not docbook. This can lead to build failure
when docbook is not available, but "--enable-introspection"
is given.
Instead of adding yet another configure option to fine-tune
and say "--with-docbook --disable-gtk-doc", just simplify it.
Now, documentation (both man pages and setting docs) will be generated
with "--enable-gtk-doc" and "--enable-introspection".
If the documentation is not about to be generated, pre-generated docs
will be installed if they are available. That is commonly the case
with a source tarball, but not with a git checkout.
Finally, if documentation is nither generated nor pre-generated,
no documentation will be installed *duh*.
This removes the possibility to treat man pages separate from settings
docs. Now you either generate both, install both pre-generated, or don't
get any of them.
https://bugzilla.gnome.org/show_bug.cgi?id=778551
2017-02-13 16:26:20 +01:00
|
|
|
if BUILD_DOCS
|
2014-06-27 12:25:54 -04:00
|
|
|
|
2020-05-29 10:21:07 +02:00
|
|
|
settings-spec.xml: settings-spec.xsl $(top_builddir)/libnm/nm-settings-docs-dbus.xml
|
2020-06-02 17:47:30 +02:00
|
|
|
$(AM_V_GEN) (! test -f $@ || chmod u+w $@) && xsltproc --output $@ $^
|
2014-06-27 12:25:54 -04:00
|
|
|
|
|
|
|
|
# Top-level SGML file includes (depends on) settings-spec.xml
|
|
|
|
|
$(DOC_MAIN_SGML_FILE): settings-spec.xml
|
|
|
|
|
|
|
|
|
|
GENERATED_FILES += settings-spec.xml
|
|
|
|
|
|
2013-05-10 09:55:09 -05:00
|
|
|
all: $(GENERATED_FILES)
|
|
|
|
|
|
|
|
|
|
endif
|
2011-02-16 16:24:16 -06:00
|
|
|
|
|
|
|
|
####################################
|
|
|
|
|
|
|
|
|
|
# The name of the module.
|
|
|
|
|
DOC_MODULE=NetworkManager
|
|
|
|
|
|
|
|
|
|
# The top-level SGML file.
|
|
|
|
|
DOC_MAIN_SGML_FILE=network-manager-docs.xml
|
|
|
|
|
|
2012-07-02 12:29:52 -05:00
|
|
|
DOC_SOURCE_DIR=$(srcdir)
|
|
|
|
|
|
2011-02-16 16:24:16 -06:00
|
|
|
# Extra options to supply to gtkdoc-mkdb
|
|
|
|
|
MKDB_OPTIONS=--sgml-mode --output-format=xml
|
|
|
|
|
|
|
|
|
|
# Extra options to supply to gtkdoc-mktmpl
|
|
|
|
|
MKTMPL_OPTIONS=
|
|
|
|
|
|
2014-06-13 11:08:56 -04:00
|
|
|
# Extra options to supply to gtkdoc-mkhtml
|
|
|
|
|
MKHTML_OPTIONS=--path="$(abs_srcdir)"
|
|
|
|
|
|
2017-03-10 18:40:03 +01:00
|
|
|
# Files to be included in $(DOC_MAIN_SGML_FILE)
|
2011-02-16 16:24:16 -06:00
|
|
|
content_files = \
|
2017-03-10 18:40:03 +01:00
|
|
|
$(GENERATED_FILES) \
|
2016-11-23 13:14:08 +01:00
|
|
|
dbus-org.freedesktop.NetworkManager.AccessPoint.xml \
|
2018-10-10 23:30:46 +02:00
|
|
|
dbus-org.freedesktop.NetworkManager.AgentManager.xml \
|
2016-11-23 13:14:08 +01:00
|
|
|
dbus-org.freedesktop.NetworkManager.Connection.Active.xml \
|
2018-10-10 23:30:46 +02:00
|
|
|
dbus-org.freedesktop.NetworkManager.DHCP4Config.xml \
|
2016-11-23 13:14:08 +01:00
|
|
|
dbus-org.freedesktop.NetworkManager.DHCP6Config.xml \
|
2018-10-10 23:30:46 +02:00
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Adsl.xml \
|
2016-11-23 13:14:08 +01:00
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Bluetooth.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Bond.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Bridge.xml \
|
2018-10-10 23:30:46 +02:00
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Dummy.xml \
|
2016-11-23 13:14:08 +01:00
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Generic.xml \
|
2018-10-10 23:30:46 +02:00
|
|
|
dbus-org.freedesktop.NetworkManager.Device.IPTunnel.xml \
|
2016-11-23 13:14:08 +01:00
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Infiniband.xml \
|
2018-10-10 23:30:46 +02:00
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Macsec.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Macvlan.xml \
|
2016-11-23 13:14:08 +01:00
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Modem.xml \
|
2018-10-10 23:30:46 +02:00
|
|
|
dbus-org.freedesktop.NetworkManager.Device.OlpcMesh.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Statistics.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Team.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Tun.xml \
|
2016-11-23 13:14:08 +01:00
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Veth.xml \
|
2018-10-10 23:30:46 +02:00
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Vlan.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Vxlan.xml \
|
2019-01-28 15:21:59 +01:00
|
|
|
dbus-org.freedesktop.NetworkManager.Device.WifiP2P.xml \
|
2018-03-13 13:42:38 +00:00
|
|
|
dbus-org.freedesktop.NetworkManager.Device.WireGuard.xml \
|
2018-10-10 23:30:46 +02:00
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Wired.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.Device.Wireless.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.Device.xml \
|
2016-12-15 20:13:40 +01:00
|
|
|
dbus-org.freedesktop.NetworkManager.DnsManager.xml \
|
2018-10-10 23:30:46 +02:00
|
|
|
dbus-org.freedesktop.NetworkManager.IP4Config.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.IP6Config.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.PPP.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.SecretAgent.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.Settings.Connection.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.Settings.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.VPN.Connection.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.VPN.Plugin.xml \
|
|
|
|
|
dbus-org.freedesktop.NetworkManager.xml \
|
2016-04-21 18:06:43 +02:00
|
|
|
$(top_builddir)/libnm-core/nm-dbus-types.xml \
|
|
|
|
|
$(top_builddir)/libnm-core/nm-vpn-dbus-types.xml \
|
2016-03-28 14:32:30 +02:00
|
|
|
$(top_builddir)/man/nmcli.xml \
|
2016-04-04 18:29:46 +02:00
|
|
|
$(top_builddir)/man/nmtui.xml \
|
2016-04-04 18:05:49 +02:00
|
|
|
$(top_builddir)/man/nm-online.xml \
|
2018-04-28 20:36:15 +02:00
|
|
|
$(top_builddir)/man/nm-initrd-generator.xml \
|
2016-03-24 13:30:52 +01:00
|
|
|
$(top_builddir)/man/NetworkManager.xml \
|
|
|
|
|
$(top_builddir)/man/NetworkManager.conf.xml \
|
|
|
|
|
$(top_builddir)/man/nmcli-examples.xml \
|
|
|
|
|
$(top_builddir)/man/nm-settings.xml \
|
2016-04-04 20:32:38 +02:00
|
|
|
$(top_builddir)/man/nm-settings-keyfile.xml \
|
|
|
|
|
version.xml \
|
|
|
|
|
$(NULL)
|
2016-03-31 22:15:51 +02:00
|
|
|
|
2018-09-14 18:14:46 +02:00
|
|
|
|
|
|
|
|
if WITH_OPENVSWITCH
|
|
|
|
|
content_files += $(top_builddir)/man/nm-openvswitch.xml
|
|
|
|
|
endif
|
|
|
|
|
|
2016-03-31 22:15:51 +02:00
|
|
|
if CONFIG_PLUGIN_IFCFG_RH
|
2016-04-04 20:32:38 +02:00
|
|
|
content_files += $(top_builddir)/man/nm-settings-ifcfg-rh.xml
|
2016-03-31 22:15:51 +02:00
|
|
|
endif
|
2016-03-26 10:17:34 +01:00
|
|
|
|
2011-02-16 16:24:16 -06:00
|
|
|
include $(top_srcdir)/gtk-doc.make
|
|
|
|
|
|
2020-06-02 17:47:30 +02:00
|
|
|
# workaround setup-build.stamp from gtk-doc.make, which copies
|
|
|
|
|
# the file as read-only. That breaks later build steps, as the
|
|
|
|
|
# file can no longer be written. Instead, copy the file with `cp -f`
|
|
|
|
|
# only.
|
|
|
|
|
setup-build.stamp:
|
|
|
|
|
-$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
|
|
|
|
|
files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \
|
|
|
|
|
if test "x$$files" != "x" ; then \
|
|
|
|
|
for file in $$files ; do \
|
|
|
|
|
destdir=`dirname $(abs_builddir)/$$file`; \
|
|
|
|
|
test -d "$$destdir" || mkdir -p "$$destdir"; \
|
|
|
|
|
test -f $(abs_srcdir)/$$file && \
|
|
|
|
|
( cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file ; \
|
|
|
|
|
chmod u+w $(abs_builddir)/$$file ) || true; \
|
|
|
|
|
done; \
|
|
|
|
|
fi; \
|
|
|
|
|
fi
|
|
|
|
|
$(AM_V_at)touch setup-build.stamp
|
|
|
|
|
|
2011-02-16 16:24:16 -06:00
|
|
|
####################################
|
|
|
|
|
|
2018-01-08 13:06:54 +01:00
|
|
|
EXTRA_DIST += version.xml.in settings-spec.xsl meson.build $(GENERATED_FILES)
|
2012-11-13 23:13:25 +01:00
|
|
|
CLEANFILES += html/* tmpl/* xml/* \
|
|
|
|
|
NetworkManager-sections.txt \
|
2014-06-13 11:08:56 -04:00
|
|
|
NetworkManager-overrides.txt
|
|
|
|
|
|
docs: make the settings docs work from tarball builds
docs/api/settings-spec.xml was accidentally not getting disted,
because gtk-doc.make explicitly removes all DISTCLEANFILES from
distdir. However, it doesn't actually make sense for the settings docs
files to be in DISTCLEANFILES anyway; they were put there rather than
CLEANFILES (IIRC) so that "make clean" in a tarball build wouldn't
delete them and break things. But the right fix is to just make them
only be in CLEANFILES when BUILD_SETTING_DOCS is true, and not ever
get deleted otherwise.
Also adjust the build rules to ensure that the generated docs don't
get rebuilt in tarball builds, since that can cause problems when
building from a read-only source tree, etc.
Meanwhile, in an unrelated but also fatal bug, configure.ac's check
for if the generated docs were already present never got updated for
the cli/src -> clients/cli move, and so even if we had been disting
settings-spec.xml, configure would still think that the tarball didn't
have all of the generated docs in it, so SETTING_DOCS_AVAILABLE would
be set false and none of the generated docs would get used.
https://bugzilla.gnome.org/show_bug.cgi?id=740035
2014-11-12 15:50:39 -05:00
|
|
|
CLEANFILES += settings-spec.xml
|