docs: configure/Makefile changes to require at least Doxygen 1.5

This commit is contained in:
David Adam 2013-06-19 23:59:13 +08:00
parent 292908c00a
commit 93278dc7e3
2 changed files with 59 additions and 4 deletions

View file

@ -76,6 +76,11 @@ LDFLAGS_MIMEDB = ${LDFLAGS} @LIBS_MIMEDB@
HAVE_GETTEXT=@HAVE_GETTEXT@
#
# Set to 1 if we have doxygen
#
HAVE_DOXYGEN=@HAVE_DOXYGEN@
#
#Additional .cpp files used by common.o. These also have a corresponding
@ -258,12 +263,21 @@ MANUALS := $(addsuffix .1, $(addprefix share/man/man1/, \
TRANSLATIONS_SRC := $(wildcard po/*.po)
TRANSLATIONS := $(TRANSLATIONS_SRC:.po=.gmo)
#
# If Doxygen is not available, don't attempt to build the documentation
#
ifeq ($(HAVE_DOXYGEN), 1)
user_doc=user_doc
else
user_doc=
endif
#
# Make everything needed for installing fish
#
all: $(PROGRAMS) user_doc share/man $(TRANSLATIONS)
all: $(PROGRAMS) $(user_doc) share/man $(TRANSLATIONS)
@echo fish has now been built.
@echo Use \'$(MAKE) install\' to install fish.
.PHONY: all
@ -297,10 +311,9 @@ prof: all
# Depend on the sources (*.hdr.in) and manually make the
# intermediate *.hdr and doc.h files if needed
# Allow doxygen to fail, e.g. if it does not exist
user_doc: $(HDR_FILES_SRC) Doxyfile.user user_doc.head.html $(HELP_SRC) doc.h $(HDR_FILES)
- (cat Doxyfile.user ; echo PROJECT_NUMBER=@PACKAGE_VERSION@) | doxygen - && touch user_doc
(cat Doxyfile.user ; echo PROJECT_NUMBER=@PACKAGE_VERSION@) | doxygen - && touch user_doc
#
@ -839,7 +852,7 @@ clean:
rm -f fish-@PACKAGE_VERSION@.tar
rm -f fish-@PACKAGE_VERSION@.tar.gz
rm -f fish-@PACKAGE_VERSION@.tar.bz2
if command -v doxygen; then \
if test $(HAVE_DOXYGEN) = 1; then \
rm -rf doc user_doc share/man; \
fi
rm -rf fish-@PACKAGE_VERSION@

View file

@ -19,6 +19,7 @@ conf_arg=$@
AC_SUBST(docdir)
AC_SUBST(HAVE_GETTEXT)
AC_SUBST(HAVE_DOXYGEN)
AC_SUBST(LDFLAGS_FISH)
AC_SUBST(LIBS_FISH)
AC_SUBST(LIBS_FISH_INDENT)
@ -184,6 +185,47 @@ AS_IF([test x$local_gettext != xno],
],
)
#
# Build/clean the documentation only if Doxygen is available
#
doxygen_minimum=1.5
AC_ARG_WITH(
doxygen,
AS_HELP_STRING(
[--with-doxygen],
[use Doxygen to regenerate documentation]
),
[use_doxygen=$withval],
[use_doxygen=auto]
)
AS_IF([test "$use_doxygen" != "no"],
[
AC_CHECK_PROGS([found_doxygen], [doxygen], [no])
if test "$found_doxygen" != no; then
# test version
AC_MSG_CHECKING([the doxygen version])
doxygen_version=`doxygen --version 2>/dev/null`
AC_MSG_RESULT([$doxygen_version])
AS_VERSION_COMPARE([$doxygen_version], [$doxygen_minimum],
[ if test "$use_doxygen" = auto; then
AC_MSG_WARN([doxygen version $doxygen_version found, but $doxygen_minimum required])
HAVE_DOXYGEN=0
else
AC_MSG_FAILURE([doxygen version $doxygen_version found, but $doxygen_minimum required])
fi
],
[HAVE_DOXYGEN=1], [HAVE_DOXYGEN=1])
elif test "$use_doxygen" != auto; then
AC_MSG_FAILURE([--with-doxygen was given, but the doxygen program could not be found])
else
HAVE_DOXYGEN=0
fi
],
)
#
# Try to enable large file support. This will make sure that on systems
# where off_t can be either 32 or 64 bit, the latter size is used. On