NetworkManager/man/Makefile.am
Dan Winship 916a427873 man: only remove the man pages in "make clean" if we built them
doing:

  ./configure --disable-gtk-doc
  make clean
  make

from a tarball build (or from a dirty tree that had previously had an
--enable-gtk-doc build) would fail, because configure would see the
pre-existing man pages and set INSTALL_PREGEN_MANPAGES, but "make
clean" would delete them, and there'd be no rule to regenerate them.
2013-06-13 17:45:52 -03:00

67 lines
1.5 KiB
Makefile

man_MANS =
CLEANFILES =
EXTRA_DIST =
XSLTPROC = xsltproc
XSLTPROC_FLAGS = \
--xinclude \
--nonet \
--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
XSLTPROC_MAN_FLAGS = $(XSLTPROC_FLAGS) 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) $<
nm-settings.xml: $(top_builddir)/tools/generate-settings-spec $(top_builddir)/libnm-util/libnm-util.la
rm -f $(builddir)/$@
$(top_builddir)/tools/generate-settings-spec refentry $(builddir)/$@
endif
configure_generated_man_pages = \
nmcli.1 \
nm-online.1 \
nm-system-settings.conf.5
docbook_generated_man_pages = \
NetworkManager.8 \
NetworkManager.conf.5
docbook_autogenerated_man_pages = \
nm-settings.5
generated_man_pages = \
$(docbook_generated_man_pages) \
$(docbook_autogenerated_man_pages)
EXTRA_DIST += \
$(docbook_generated_man_pages:.%=.xml) \
$(docbook_autogenerated_man_pages)
CLEANFILES += \
nm-settings.xml
man_MANS += $(configure_generated_man_pages)
if ENABLE_GTK_DOC
man_MANS += $(generated_man_pages)
CLEANFILES += \
$(docbook_autogenerated_man_pages) \
$(docbook_generated_man_pages)
else
if INSTALL_PREGEN_MANPAGES
man_MANS += $(generated_man_pages)
endif
endif