From 0874edfdf817ec3126b40cbae8541e4377cee9bb Mon Sep 17 00:00:00 2001 From: Jaap Versteegh Date: Wed, 13 Dec 2017 13:05:45 +0100 Subject: [PATCH] Fixed issue with HAVE_DOXYGEN define --- configure.ac | 4 ++++ doc/Makefile.am | 27 ++++++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 76e3373..d32d991 100755 --- a/configure.ac +++ b/configure.ac @@ -435,6 +435,10 @@ char string[16]; ] ) +AC_PATH_PROG([DOXYGEN], [doxygen], []) +AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) +AM_COND_IF([HAVE_DOXYGEN], AC_CONFIG_FILES([doc/Doxyfile])) + #AC_CONFIG_FILES([Makefile]) AC_OUTPUT(Makefile bin/Makefile man/Makefile) diff --git a/doc/Makefile.am b/doc/Makefile.am index f66174c..c4f9a50 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,15 +1,24 @@ -#if HAVE_DOXYGEN - directory = $(top_srcdir)/doc -$(directory)/html: Doxyfile - $(DOXYGEN) Doxyfile +if HAVE_DOXYGEN -all-local: $(directory)/html +doxygen-build.stamp: Doxyfile + $(DOXYGEN) Doxyfile + touch $@ + +else + +doxygen-build.stamp: + @echo "*** Doxygen not found. Documentation will not be build." + touch $@ + +endif + +all-local: doxygen-build.stamp clean-local: - rm -rf $(directory)/html - rm -rf $(directory)/man - rm -rf $(directory)/xml + rm -f doxygen-build.stamp + rm -rf html + rm -rf man + rm -rf xml -#endif