diff options
author | Dan Winship <danw@gnome.org> | 2014-11-12 15:50:39 -0500 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-11-14 17:14:18 -0500 |
commit | 16a9fc49ddd59ded7e03cea2deb3d33bde788000 (patch) | |
tree | e5b2e5c84beedf13c1752a9c5096241f1cc2a3f9 | |
parent | d1faee92288831517f6f5f7baa057c790be3b022 (diff) | |
download | NetworkManager-16a9fc49ddd59ded7e03cea2deb3d33bde788000.tar.gz |
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
-rw-r--r-- | clients/cli/Makefile.am | 3 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | docs/api/Makefile.am | 7 | ||||
-rw-r--r-- | libnm-util/Makefile.am | 13 | ||||
-rw-r--r-- | man/Makefile.am | 10 |
5 files changed, 21 insertions, 14 deletions
diff --git a/clients/cli/Makefile.am b/clients/cli/Makefile.am index 0820aab045..482de7a833 100644 --- a/clients/cli/Makefile.am +++ b/clients/cli/Makefile.am @@ -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 diff --git a/configure.ac b/configure.ac index 5888179c80..c123fe854a 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/docs/api/Makefile.am b/docs/api/Makefile.am index 683340e684..a364da035c 100644 --- a/docs/api/Makefile.am +++ b/docs/api/Makefile.am @@ -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 diff --git a/libnm-util/Makefile.am b/libnm-util/Makefile.am index f0a885afcd..51864df15e 100644 --- a/libnm-util/Makefile.am +++ b/libnm-util/Makefile.am @@ -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 diff --git a/man/Makefile.am b/man/Makefile.am index 5d0386ff38..589a3325ff 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -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 |