diff --git a/.gitignore b/.gitignore index e5f7da28c..210b3026f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,13 @@ *.gcda *.gcno *.gcov +*.l[ao] *.tcov *~ .deps +/.libs/ +/Doxyfile +/Doxyfile-api /INSTALL /aclocal.m4 /autom4te.cache @@ -24,6 +28,7 @@ /doc/protocol-binary-range.txt /doc/protocol-binary.txt /install-sh +/libtool /ltmain.sh /m4/version.m4 /memcached @@ -44,6 +49,3 @@ Makefile.in TAGS cscope.out tags -*.l[ao] -/libtool -/.libs/ diff --git a/Doxyfile-api b/Doxyfile-api.in similarity index 99% rename from Doxyfile-api rename to Doxyfile-api.in index 76a8a37de..2464101e3 100644 --- a/Doxyfile-api +++ b/Doxyfile-api.in @@ -31,7 +31,7 @@ PROJECT_NAME = memcached public API # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = @PROJECT_NUMBER@ # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. @@ -1304,7 +1304,7 @@ EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). -PERL_PATH = /usr/bin/perl +PERL_PATH = @PERL@ #--------------------------------------------------------------------------- # Configuration options related to the dot tool @@ -1339,7 +1339,7 @@ HIDE_UNDOC_RELATIONS = YES # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) -HAVE_DOT = YES +HAVE_DOT = @HAVE_DOT@ # By default doxygen will write a font called FreeSans.ttf to the output # directory and reference it in all dot files that doxygen generates. This diff --git a/Doxyfile b/Doxyfile.in similarity index 99% rename from Doxyfile rename to Doxyfile.in index fc19d3d67..aca925887 100644 --- a/Doxyfile +++ b/Doxyfile.in @@ -31,7 +31,7 @@ PROJECT_NAME = memcached # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = @PROJECT_NUMBER@ # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. @@ -1304,7 +1304,7 @@ EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). -PERL_PATH = /usr/bin/perl +PERL_PATH = @PERL@ #--------------------------------------------------------------------------- # Configuration options related to the dot tool @@ -1339,7 +1339,7 @@ HIDE_UNDOC_RELATIONS = YES # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) -HAVE_DOT = YES +HAVE_DOT = @HAVE_DOT@ # By default doxygen will write a font called FreeSans.ttf to the output # directory and reference it in all dot files that doxygen generates. This diff --git a/Makefile.am b/Makefile.am index bcc43eae0..07dfc8f8e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -111,8 +111,8 @@ test: memcached sizes testapp else :; fi docs: - (cat Doxyfile-api ; echo "PROJECT_NUMBER=`cat version.num`") | doxygen - - (cat Doxyfile ; echo "PROJECT_NUMBER=`cat version.num`") | doxygen - + ${DOXYGEN} Doxyfile-api + ${DOXYGEN} Doxyfile dist-hook: rm -f $(distdir)/*/*~ $(distdir)/t/lib/*~ $(distdir)/*~ diff --git a/configure.ac b/configure.ac index 8f90544af..a692bdea5 100644 --- a/configure.ac +++ b/configure.ac @@ -534,6 +534,16 @@ then CFLAGS="$CFLAGS -errfmt=error -errwarn -errshort=tags" fi +dnl Check for stuff needed to run Doxygen +AC_PATH_PROG([DOT], [dot], "no") +AS_IF(test "x$DOT" = "xno", [HAVE_DOT=NO], [HAVE_DOT=YES]) +AC_PATH_PROG([DOXYGEN], [doxygen], "doxygen") +AC_PATH_PROG([PERL], [perl], "perl") +AC_SUBST(HAVE_DOT) +PROJECT_NUMBER=VERSION_NUMBER +AC_SUBST(PROJECT_NUMBER) + +dnl Generate output files CPPFLAGS="-I\${top_srcdir}/include ${CPPFLAGS}" -AC_CONFIG_FILES(Makefile doc/Makefile) +AC_CONFIG_FILES(Makefile doc/Makefile Doxyfile Doxyfile-api) AC_OUTPUT