NetworkManager/man/Makefile.am
Dan Winship 16a9fc49dd 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-14 17:14:18 -05:00

112 lines
2.6 KiB
Makefile

man_MANS =
CLEANFILES =
EXTRA_DIST =
XSLTPROC = xsltproc
XSLTPROC_FLAGS = --xinclude --nonet
XSLTPROC_MAN_FLAGS = \
$(XSLTPROC_FLAGS) \
--stringparam man.output.quietly 1 \
--stringparam funcsynopsis.style ansi \
--stringparam man.th.extra1.suppress 1 \
--stringparam man.authors.section.enabled 0 \
--stringparam man.copyright.section.enabled 0 \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
if ENABLE_GTK_DOC
%.8: %.xml
$(AM_V_GEN) xsltproc $(XSLTPROC_MAN_FLAGS) $<
%.5: %.xml
$(AM_V_GEN) xsltproc $(XSLTPROC_MAN_FLAGS) $<
endif
if BUILD_SETTING_DOCS
nm-settings.xml: nm-settings.xsl $(top_builddir)/libnm-util/nm-setting-docs.xml
$(AM_V_GEN) xsltproc \
--output $@ \
--stringparam version $(NM_VERSION) \
--stringparam date "`date +'%d %B %Y'`" \
$^
nm-settings-keyfile.xml: nm-settings-keyfile.xsl $(top_builddir)/libnm-util/nm-keyfile-docs.xml
$(AM_V_GEN) xsltproc \
--output $@ \
--stringparam version $(NM_VERSION) \
--stringparam date "`date +'%d %B %Y'`" \
$^
nm-settings-ifcfg-rh.xml: nm-settings-ifcfg-rh.xsl $(top_builddir)/libnm-util/nm-ifcfg-rh-docs.xml
$(AM_V_GEN) xsltproc \
--output $@ \
--stringparam version $(NM_VERSION) \
--stringparam date "`date +'%d %B %Y'`" \
$^
CLEANFILES += \
nm-settings.xml \
nm-settings-keyfile.xml \
nm-settings-ifcfg-rh.xml
endif
configure_generated_man_pages = \
nmcli.1 \
nmtui.1 \
nm-online.1 \
nm-system-settings.conf.5
docbook_generated_man_pages = \
NetworkManager.8 \
NetworkManager.conf.5 \
nmcli-examples.5
docbook_autogenerated_man_pages = \
nm-settings.5 \
nm-settings-keyfile.5 \
nm-settings-ifcfg-rh.5
EXTRA_DIST += \
nm-settings.xml \
nm-settings.xsl \
nm-settings-keyfile.xml \
nm-settings-keyfile.xsl \
nm-settings-ifcfg-rh.xml \
nm-settings-ifcfg-rh.xsl \
$(docbook_generated_man_pages:.%=.xml) \
$(docbook_autogenerated_man_pages)
man_MANS += $(configure_generated_man_pages)
links = nmtui-edit nmtui-connect nmtui-hostname
install-data-hook:
for link in $(links); do \
ln -f $(DESTDIR)$(mandir)/man1/nmtui.1 $(DESTDIR)$(mandir)/man1/$$link.1; \
done
uninstall-hook:
for link in $(links); do \
rm -f $(DESTDIR)$(mandir)/man1/$$link.1; \
done
if ENABLE_GTK_DOC
man_MANS += $(docbook_generated_man_pages)
CLEANFILES += $(docbook_generated_man_pages)
if BUILD_SETTING_DOCS
man_MANS += $(docbook_autogenerated_man_pages)
CLEANFILES += $(docbook_autogenerated_man_pages)
endif
else
if INSTALL_PREGEN_MANPAGES
man_MANS += \
$(docbook_generated_man_pages) \
$(docbook_autogenerated_man_pages)
endif
endif