Skip to content

Commit

Permalink
Detect dependencies and create doxyfiles during configure
Browse files Browse the repository at this point in the history
  • Loading branch information
Trond Norbye authored and dustin committed Mar 28, 2010
1 parent ac41433 commit 8710e6e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
*.gcda
*.gcno
*.gcov
*.l[ao]
*.tcov
*~
.deps
/.libs/
/Doxyfile
/Doxyfile-api
/INSTALL
/aclocal.m4
/autom4te.cache
Expand All @@ -24,6 +28,7 @@
/doc/protocol-binary-range.txt
/doc/protocol-binary.txt
/install-sh
/libtool
/ltmain.sh
/m4/version.m4
/memcached
Expand All @@ -44,6 +49,3 @@ Makefile.in
TAGS
cscope.out
tags
*.l[ao]
/libtool
/.libs/
6 changes: 3 additions & 3 deletions Doxyfile-api → Doxyfile-api.in
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Doxyfile → Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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)/*~
12 changes: 11 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8710e6e

Please sign in to comment.