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
This commit is contained in:
@@ -55,10 +55,9 @@ settings-docs.c: settings-docs.xsl $(top_builddir)/libnm-util/nm-setting-docs.xm
|
||||
$(AM_V_GEN) xsltproc --output $@ $^
|
||||
|
||||
BUILT_SOURCES = settings-docs.c
|
||||
CLEANFILES = settings-docs.c
|
||||
endif
|
||||
|
||||
DISTCLEANFILES = settings-docs.c
|
||||
|
||||
EXTRA_DIST = settings-docs.c settings-docs.xsl
|
||||
|
||||
completiondir = $(datadir)/bash-completion/completions
|
||||
|
@@ -897,7 +897,7 @@ if test "$build_setting_docs" != "yes" \
|
||||
-a -f man/nm-settings-keyfile.xml \
|
||||
-a -f man/nm-settings-ifcfg-rh.xml \
|
||||
-a -f docs/api/settings-spec.xml \
|
||||
-a -f cli/src/settings-docs.c; then
|
||||
-a -f clients/cli/settings-docs.c; then
|
||||
AC_DEFINE(HAVE_SETTING_DOCS, [1], [Define if you have pre-built settings docs])
|
||||
have_setting_docs=yes
|
||||
fi
|
||||
|
@@ -70,5 +70,10 @@ CLEANFILES += html/* tmpl/* xml/* \
|
||||
NetworkManager-sections.txt \
|
||||
NetworkManager-overrides.txt
|
||||
|
||||
DISTCLEANFILES = $(GENERATED_FILES)
|
||||
if BUILD_SETTING_DOCS
|
||||
CLEANFILES += settings-spec.xml
|
||||
endif
|
||||
|
||||
if ENABLE_GTK_DOC
|
||||
CLEANFILES += spec.html
|
||||
endif
|
||||
|
@@ -191,21 +191,24 @@ if BUILD_SETTING_DOCS
|
||||
|
||||
noinst_DATA = nm-setting-docs.xml nm-keyfile-docs.xml nm-ifcfg-rh-docs.xml
|
||||
|
||||
nm-setting-docs.xml: generate-setting-docs.py NetworkManager-1.0.gir NetworkManager-1.0.typelib libnm-util.la
|
||||
docs_sources = $(filter-out $(BUILT_SOURCES),$(libnm_util_la_csources))
|
||||
|
||||
nm-setting-docs.xml: generate-setting-docs.py $(docs_sources) | NetworkManager-1.0.gir NetworkManager-1.0.typelib libnm-util.la
|
||||
export GI_TYPELIB_PATH=$(abs_builddir)$${GI_TYPELIB_PATH:+:$$GI_TYPELIB_PATH}; \
|
||||
export LD_LIBRARY_PATH=$(abs_builddir)/.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH}; \
|
||||
$(srcdir)/generate-setting-docs.py \
|
||||
--gir $(builddir)/NetworkManager-1.0.gir \
|
||||
--output $@
|
||||
|
||||
nm-keyfile-docs.xml: generate-plugin-docs.pl $(libnm_util_la_csources)
|
||||
nm-keyfile-docs.xml: generate-plugin-docs.pl $(docs_sources)
|
||||
$(srcdir)/generate-plugin-docs.pl keyfile $(srcdir) $@
|
||||
nm-ifcfg-rh-docs.xml: generate-plugin-docs.pl $(libnm_util_la_csources)
|
||||
nm-ifcfg-rh-docs.xml: generate-plugin-docs.pl $(docs_sources)
|
||||
$(srcdir)/generate-plugin-docs.pl ifcfg-rh $(srcdir) $@
|
||||
|
||||
endif
|
||||
CLEANFILES += $(noinst_DATA)
|
||||
EXTRA_DIST += $(noinst_DATA)
|
||||
|
||||
DISTCLEANFILES += nm-setting-docs.xml nm-keyfile-docs.xml nm-ifcfg-rh-docs.xml
|
||||
endif
|
||||
|
||||
EXTRA_DIST += generate-setting-docs.py generate-plugin-docs.pl
|
||||
|
||||
|
@@ -48,6 +48,11 @@ nm-settings-ifcfg-rh.xml: nm-settings-ifcfg-rh.xsl $(top_builddir)/libnm-util/nm
|
||||
--stringparam date "`date +'%d %B %Y'`" \
|
||||
$^
|
||||
|
||||
CLEANFILES += \
|
||||
nm-settings.xml \
|
||||
nm-settings-keyfile.xml \
|
||||
nm-settings-ifcfg-rh.xml
|
||||
|
||||
endif
|
||||
|
||||
configure_generated_man_pages = \
|
||||
@@ -76,11 +81,6 @@ EXTRA_DIST += \
|
||||
$(docbook_generated_man_pages:.%=.xml) \
|
||||
$(docbook_autogenerated_man_pages)
|
||||
|
||||
DISTCLEANFILES = \
|
||||
nm-settings.xml \
|
||||
nm-settings-keyfile.xml \
|
||||
nm-settings-ifcfg-rh.xml
|
||||
|
||||
man_MANS += $(configure_generated_man_pages)
|
||||
|
||||
links = nmtui-edit nmtui-connect nmtui-hostname
|
||||
|
Reference in New Issue
Block a user