diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2006-02-17 21:48:45 +0100 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2006-02-17 21:48:45 +0100 |
commit | 48cc9f3beb7053f51fcdabe25439faae648b6370 (patch) | |
tree | 028da3c227ca90bf6b60d41cb016b10812312357 | |
parent | 4aff153d7b3cb9e0d2ba698a11120d13c5903ff1 (diff) | |
download | pacman-48cc9f3beb7053f51fcdabe25439faae648b6370.tar.gz pacman-48cc9f3beb7053f51fcdabe25439faae648b6370.tar.xz |
doxygen support for autotools (patch from Christian Hamar <krics@linuxforum.hu>
-rwxr-xr-x | autoclean.sh | 1 | ||||
-rw-r--r-- | configure.ac | 28 | ||||
-rw-r--r-- | doc/Makefile.am | 5 | ||||
-rw-r--r-- | lib/libalpm/Makefile.am | 9 |
4 files changed, 43 insertions, 0 deletions
diff --git a/autoclean.sh b/autoclean.sh index a3d16104..b088bb74 100755 --- a/autoclean.sh +++ b/autoclean.sh @@ -24,6 +24,7 @@ rm -rf doc/Makefile rm -rf doc/Makefile.in rm -rf doc/html/* rm -rf doc/*.8 +rm -rf doc/man3/* rm -rf compile rm -rf libtool rm -rf scripts/.deps/ diff --git a/configure.ac b/configure.ac index 9d6f8d51..43f05519 100644 --- a/configure.ac +++ b/configure.ac @@ -57,6 +57,11 @@ AC_ARG_ENABLE(fakeroot, AC_HELP_STRING([--disable-fakeoot], [Disable fakeroot proof support]), [fakeroot=$enableval], [fakeroot=yes]) +dnl Help line for doxygen +AC_ARG_ENABLE(doxygen, + AC_HELP_STRING([--disable-doxygen], [Build API docs via Doxygen]), + [wantdoxygen=$enableval], [wantdoxygen=yes]) + dnl Check for man2html binary AC_MSG_CHECKING(for support man2html) if test x$wantman2html = xyes ; then @@ -75,6 +80,27 @@ else AC_MSG_RESULT(not requested by configure) fi +dnl Check for doxygen support +AC_MSG_CHECKING(for support Doxygen) +if test x$wantdoxygen = xyes ; then + AC_CHECK_PROGS([DOXYGEN], [doxygen] [doxygen binary]) + AM_CONDITIONAL(HAS_DOXYGEN, test $DOXYGEN) + if test $DOXYGEN ; then + AC_DEFINE([HAS_DOXYGEN], [TRUE], [Enabled Doxygen Support]) + AC_MSG_RESULT(yes) + DOXYSTATUS="yes, path: `which $DOXYGEN`" + else + AC_DEFINE([HAS_DOXYGEN], [FALSE], [Disabled Doxygen support]) + AC_MSG_RESULT(no, doxygen missing) + DOXYSTATUS="doxygen binary not found" + fi +else + AM_CONDITIONAL(HAS_DOXYGEN, test $DOXYGEN) + AC_DEFINE([HAS_DOXYGEN], [FALSE], [Not specified at configure line]) + AC_MSG_RESULT(not requested by configure) + DOXYSTATUS="disabled by configure" +fi + dnl Enable or disable Warning FLAGS during compile AC_MSG_CHECKING(for more compiler warnings) if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then @@ -165,4 +191,6 @@ pacman-$VERSION: libalpm version: ${PM_VERSION} debug support: ${debug} + + Doxygen support : ${DOXYSTATUS} " diff --git a/doc/Makefile.am b/doc/Makefile.am index 40635fc6..b24995cb 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -17,4 +17,9 @@ clean: rm -rf html/* man_MANS: pacman.8 makepkg.8 libalpm.3 + +if HAS_DOXYGEN +man_MANS += man3/*.3 +endif + EXTRA_DIST = $(man_MANS) diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am index 42b9b80c..f4c73337 100644 --- a/lib/libalpm/Makefile.am +++ b/lib/libalpm/Makefile.am @@ -31,3 +31,12 @@ include_HEADERS = alpm.h libalpm_la_SOURCES = $(TARGETS) libalpm_la_LDFLAGS = -no-undefined -version-info $(PM_VERSION_INFO) + +if HAS_DOXYGEN +all: doxygen.in + +doxygen.in: + doxygen Doxyfile + +endif + |