From 3c88f4f0dfd03d24f86775f298eecda474f0da6b Mon Sep 17 00:00:00 2001 From: caro Date: Thu, 22 Jan 2009 21:14:12 +0000 Subject: [PATCH] fix logic in efl_doxygen.m4 git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eet@38700 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- configure.ac | 2 +- doc/Makefile.am | 4 ++-- m4/efl_doxygen.m4 | 53 ++++++++++++++++++++++++++++++----------------------- 3 files changed, 33 insertions(+), 26 deletions(-) diff --git a/configure.ac b/configure.ac index 375543b..8df66dc 100644 --- a/configure.ac +++ b/configure.ac @@ -365,7 +365,7 @@ echo " Openssl..............: ${have_openssl}" echo " Cipher support.....: ${have_cipher}" echo " Signature..........: ${have_signature}" echo -echo " Documentation........: ${enable_doc}" +echo " Documentation........: ${build_doc}" echo " Tests................: ${enable_tests}" echo " Coverage.............: ${enable_coverage}" echo diff --git a/doc/Makefile.am b/doc/Makefile.am index edaffcb..aa9668c 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -10,8 +10,8 @@ if EFL_BUILD_DOC doc-clean: rm -rf html/ latex/ man/ xml/ $(PACKAGE_DOCNAME).tar* -doc: all doc-clean - $(DOXYGEN) +doc: doc-clean + $(efl_doxygen) cp img/* html/ rm -rf $(PACKAGE_DOCNAME).tar* mkdir -p $(PACKAGE_DOCNAME)/doc diff --git a/m4/efl_doxygen.m4 b/m4/efl_doxygen.m4 index 49a3dfa..37acb3a 100644 --- a/m4/efl_doxygen.m4 +++ b/m4/efl_doxygen.m4 @@ -11,52 +11,55 @@ dnl AC_DEFUN([EFL_CHECK_DOXYGEN], [ -DOXYGEN="doxygen" - dnl dnl Disable the build of the documentation dnl AC_ARG_ENABLE([doc], - AC_HELP_STRING( - [--disable-doc], - [Disable the build of the documentation]), - [if test "${disable_doc}" = "yes" ; then - enable_doc="no" + [AC_HELP_STRING( + [--disable-doc], + [Disable documentation build @<:@default=enabled@:>@])], + [ + if test "x${enableval}" = "xyes" ; then + efl_enable_doc="yes" else - enable_doc="yes" - fi], - [enable_doc="yes"] + efl_enable_doc="no" + fi + ], + [efl_enable_doc="yes"] ) dnl dnl Specify the full file name, with path dnl + +efl_doxygen="doxygen" + AC_ARG_WITH([doxygen], - AC_HELP_STRING( - [--with-doxygen=FILE], - [doxygen program to use @<:@default=doxygen@:>@]), + [AC_HELP_STRING( + [--with-doxygen=FILE], + [doxygen program to use @<:@default=doxygen@:>@])], dnl dnl Check the given doxygen program. dnl [DOXYGEN=${withval} - AC_CHECK_PROG([BUILD_DOCS], - [${DOXYGEN}], + AC_CHECK_PROG([efl_have_doxygen], + [${efl_doxygen}], [yes], [no]) - if test "x${BUILD_DOCS}" = "xno" ; then + if test "x${efl_have_doxygen}" = "xno" ; then echo "WARNING:" echo "The doxygen program you specified:" - echo "$DOXYGEN" + echo "$efl_doxygen" echo "was not found. Please check the path and make sure " echo "the program exists and is executable." AC_MSG_WARN([Warning: no doxygen detected. Documentation will not be built]) fi ], - [AC_CHECK_PROG([BUILD_DOCS], - [${DOXYGEN}], + [AC_CHECK_PROG([efl_have_doxygen], + [${efl_doxygen}], [yes], [no]) - if test "x${BUILD_DOCS}" = "xno" ; then + if test "x${efl_have_doxygen}" = "xno" ; then echo "WARNING:" echo "The doxygen program was not found in your execute" echo "You may have doxygen installed somewhere not covered by your path." @@ -73,11 +76,15 @@ AC_ARG_WITH([doxygen], dnl dnl Substitution dnl -AC_SUBST([DOXYGEN]) +AC_SUBST([efl_doxygen]) + +if ! test "x${efl_have_doxygen}" = "xyes" ; then + efl_enable_doc="no" +fi -AM_CONDITIONAL(EFL_BUILD_DOC, test "x${BUILD_DOCS}" = "xyes") +AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_enable_doc}" = "xyes") -if test "x${BUILD_DOCS}" = "xyes" ; then +if test "x${efl_enable_doc}" = "xyes" ; then ifelse([$1], , :, [$1]) else ifelse([$2], , :, [$2]) -- 2.7.4