diff options
| author | Harish Krupo <harishkrupo@gmail.com> | 2019-04-19 19:31:08 +0530 |
|---|---|---|
| committer | Harish Krupo <harishkrupo@gmail.com> | 2019-04-19 19:34:09 +0530 |
| commit | b77cf862909f5cc2a4b20f0f92c586a1f135dd92 (patch) | |
| tree | 4c38af5ba121519c3ce052768cbd2df06ae5a8ff | |
| parent | releasing: fixup section numbers (diff) | |
| download | wayland-b77cf862909f5cc2a4b20f0f92c586a1f135dd92.tar wayland-b77cf862909f5cc2a4b20f0f92c586a1f135dd92.tar.gz wayland-b77cf862909f5cc2a4b20f0f92c586a1f135dd92.tar.bz2 wayland-b77cf862909f5cc2a4b20f0f92c586a1f135dd92.tar.lz wayland-b77cf862909f5cc2a4b20f0f92c586a1f135dd92.tar.xz wayland-b77cf862909f5cc2a4b20f0f92c586a1f135dd92.tar.zst wayland-b77cf862909f5cc2a4b20f0f92c586a1f135dd92.zip | |
docs: Abort configure if docbook-xsl package is missing
The docbook-xsl package includes all the stylesheets required to build
the docs without internet access.
Test:
One way to emulate missing style sheets is to move /etc/xml/catalog file
to a different location. Doing so should cause configure to fail with
"checking for docbook stylesheets... no"
v2: add AC_MSG_RESULT (Pekka)
Signed-off-by: Harish Krupo <harishkrupo@gmail.com>
| -rw-r--r-- | configure.ac | 26 | ||||
| -rw-r--r-- | doc/man/Makefile.am | 4 |
2 files changed, 14 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac index 1c147a9..59ae244 100644 --- a/configure.ac +++ b/configure.ac @@ -129,19 +129,6 @@ 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 @@ -177,6 +164,19 @@ if test "x$enable_documentation" = "xyes"; then [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])]) + AC_MSG_CHECKING([for docbook stylesheets]) + DOCS_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 "$DOCS_STYLESHEET" > /dev/null 2>&1`], + [HAVE_DOCS_STYLESHEET=yes])) + if test "x$HAVE_DOCS_STYLESHEET" != "xyes"; then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([Documentation build requested but docbook-xsl stylesheets are not found. Install the docbook-xsl package or disable the documentation using --disable-documentation]) + fi + + AC_MSG_RESULT([yes]) + AC_SUBST(DOCS_STYLESHEET) + AC_CONFIG_FILES([ doc/doxygen/wayland.doxygen ]) diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am index 41665eb..4e6365c 100644 --- a/doc/man/Makefile.am +++ b/doc/man/Makefile.am @@ -15,7 +15,6 @@ CLEANFILES = EXTRA_DIST = $(XML_FILES) if HAVE_XSLTPROC -if HAVE_MANPAGES_STYLESHEET CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES) EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES) @@ -30,7 +29,7 @@ XSLTPROC_FLAGS = \ XSLTPROC_PROCESS_MAN = \ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ - $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(MANPAGES_STYLESHEET) $< && \ + $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(DOCS_STYLESHEET) $< && \ $(SED) -i -e 's/^\.so \(.*\)\.\(.\)$$/\.so man\2\/\1\.\2/' $(MANPAGES_ALIASES) %.1: %.xml @@ -47,5 +46,4 @@ XSLTPROC_PROCESS_MAN = \ wl_display_connect_to_fd.3: wl_display_connect.3 -endif # HAVE_MANPAGES_STYLESHEET endif # HAVE_XSLTPROC |
