Commit e8ce6839 authored by Jonas Ådahl's avatar Jonas Ådahl Committed by Kristian H. Kristensen

man, configure.ac: Only generate man pages if we can do it offline

Instead of relying on downloading the stylesheet from the Internet for
generating man pages, only generate them if the stylesheet is available
locally.
Signed-off-by: Jonas Ådahl's avatarJonas Ådahl <jadahl@gmail.com>
parent 76dae4f0
......@@ -76,6 +76,20 @@ fi
AC_PATH_PROG(XSLTPROC, xsltproc)
AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
AC_MSG_CHECKING([for docbook manpages stylesheet])
MANPAGES_STYLESHEET=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
AC_PATH_PROGS_FEATURE_CHECK([XSLTPROC_TMP], [xsltproc],
AS_IF([`"$ac_path_XSLTPROC_TMP" --nonet "$MANPAGES_STYLESHEET" > /dev/null 2>&1`],
[HAVE_MANPAGES_STYLESHEET=yes]))
if test "x$HAVE_MANPAGES_STYLESHEET" = "xyes"; then
AM_CONDITIONAL([HAVE_MANPAGES_STYLESHEET], true)
AC_SUBST(MANPAGES_STYLESHEET)
AC_MSG_RESULT([yes])
else
AM_CONDITIONAL([HAVE_MANPAGES_STYLESHEET], false)
AC_MSG_RESULT([no])
fi
AM_CONDITIONAL(BUILD_DOCS, [test x$enable_documentation = xyes])
if test "x$enable_documentation" = "xyes"; then
AC_PATH_PROG(DOXYGEN, doxygen)
......
......@@ -16,6 +16,7 @@ EXTRA_DIST =
man_MANS =
if HAVE_XSLTPROC
if HAVE_MANPAGES_STYLESHEET
CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES)
EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES) $(XML_FILES)
......@@ -25,11 +26,12 @@ XSLTPROC_FLAGS = \
--stringparam man.authors.section.enabled 0 \
--stringparam man.copyright.section.enabled 0 \
--stringparam funcsynopsis.style ansi \
--stringparam man.output.quietly 1
--stringparam man.output.quietly 1 \
--nonet
XSLTPROC_PROCESS_MAN = \
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(MANPAGES_STYLESHEET) $< && \
$(SED) -i -e 's/^\.so \(.*\)\.\(.\)$$/\.so man\2\/\1\.\2/' $(MANPAGES_ALIASES)
%.1: %.xml
......@@ -46,4 +48,5 @@ XSLTPROC_PROCESS_MAN = \
wl_display_connect_to_fd.3: wl_display_connect.3
endif # HAVE_MANPAGES_STYLESHEET
endif # HAVE_XSLTPROC
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment