Never build docs from tarball releases

This fixes the build_doc logic to work as advertised and never
try to (re)build documentation when working with a tarball release.
This commit is contained in:
Martin Lucina 2010-02-18 17:25:49 +01:00
parent 8be491b7bd
commit 46824abeb2
2 changed files with 13 additions and 4 deletions

View File

@ -77,9 +77,9 @@ on_mingw32="no"
AC_CANONICAL_HOST AC_CANONICAL_HOST
# Determine whether or not documentation should be built. # Determine whether or not documentation should be built.
build_doc="yes" build_doc="no"
install_man="yes" install_man="yes"
if test ! -f "doc/zmq.html"; then if test -d ".git"; then
# We are building from git. # We are building from git.
# Check for asciidoc and xmlto and don't build the docs if these are not installed. # Check for asciidoc and xmlto and don't build the docs if these are not installed.
AC_CHECK_PROG(have_asciidoc, asciidoc, yes, no) AC_CHECK_PROG(have_asciidoc, asciidoc, yes, no)
@ -88,8 +88,17 @@ if test ! -f "doc/zmq.html"; then
build_doc="no" build_doc="no"
install_man="no" install_man="no"
AC_MSG_WARN([You are building from git and asciidoc is not installed. Documentation will not be built or installed.]) AC_MSG_WARN([You are building from git and asciidoc is not installed. Documentation will not be built or installed.])
else
build_doc="yes"
fi fi
fi fi
AC_MSG_CHECKING([whether to build documentation])
AC_MSG_RESULT([$build_doc])
AC_MSG_CHECKING([whether to install manpages])
if test ! -f "./doc/zmq.7"; then
AC_MSG_ERROR([configure thinks we want to install manpages but they're not present. Help!])
fi
AC_MSG_RESULT([$install_man])
# Set some default features required by 0MQ code. # Set some default features required by 0MQ code.
CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS" CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS"
@ -639,7 +648,6 @@ AC_MSG_RESULT([ Queue: $queue])
AC_MSG_RESULT([ Performance tests: $perf]) AC_MSG_RESULT([ Performance tests: $perf])
AC_MSG_RESULT([ Examples:]) AC_MSG_RESULT([ Examples:])
AC_MSG_RESULT([ Chat: $chat]) AC_MSG_RESULT([ Chat: $chat])
AC_MSG_RESULT([ Documentation: $build_doc])
AC_MSG_RESULT([]) AC_MSG_RESULT([])
AC_MSG_RESULT([ ******************************************************** ]) AC_MSG_RESULT([ ******************************************************** ])
AC_MSG_RESULT([]) AC_MSG_RESULT([])

View File

@ -26,6 +26,7 @@ MAINTAINERCLEANFILES = $(MAN_DOC) $(MAN_HTML)
dist-hook : $(MAN_DOC) $(MAN_HTML) dist-hook : $(MAN_DOC) $(MAN_HTML)
if BUILD_DOC
SUFFIXES=.html .txt .xml .1 .3 .7 SUFFIXES=.html .txt .xml .1 .3 .7
.txt.html: .txt.html:
@ -40,4 +41,4 @@ SUFFIXES=.html .txt .xml .1 .3 .7
xmlto man $< xmlto man $<
.xml.7: .xml.7:
xmlto man $< xmlto man $<
endif