aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2008-08-21 22:10:32 +0100
committerAvatar Richard Brown <rbrown@exherbo.org> 2008-08-21 22:10:32 +0100
commitfd0e987a09d468489a83a8bf5d9321a6184977e0 (patch)
tree353c12a16c485340d5a0c951b6ad1b4a7b5769c7
parent92ac70db7b7015d360619ed3587c8786af86297e (diff)
downloadpaludis-fd0e987a09d468489a83a8bf5d9321a6184977e0.tar.gz
paludis-fd0e987a09d468489a83a8bf5d9321a6184977e0.tar.xz
Add --enable-python-doc
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac31
-rw-r--r--doc/api/python/Makefile.am4
3 files changed, 35 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 61d1e69..34d7172 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,8 @@ AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip std-options foreign
EXTRA_DIST = autogen.bash automake-deps-dist-hack.tmp
SUBDIRS = misc test paludis python ruby src doc hooks vim bash-completion zsh-completion pkg-config
-DISTCHECK_CONFIGURE_FLAGS = --enable-qa --enable-ruby --enable-ruby-doc --enable-glsa --enable-vim --enable-python \
+DISTCHECK_CONFIGURE_FLAGS = --enable-qa --enable-ruby --enable-ruby-doc --enable-glsa --enable-vim \
+ --enable-python --enable-python-doc \
--with-ruby-install-dir='$${DESTDIR}$${prefix}/ruby_dir' \
--with-repositories=default \
--with-environments=default,portage \
diff --git a/configure.ac b/configure.ac
index 83b9152..a3a44f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1066,6 +1066,37 @@ AM_CONDITIONAL([ENABLE_PYTHON], test "x$enable_python" = "xyes")
AM_CONDITIONAL([ENABLE_PYTHON_HOOKS], test "x$enable_python_hooks" = "xyes")
dnl }}}
+dnl {{{ python documentation
+AC_MSG_CHECKING([whether to build the Python documentation])
+AC_ARG_ENABLE([python-doc],
+ AS_HELP_STRING([--enable-python-doc], [Enable Ruby documentation, requires --enable-python (default: disable)]),
+ enable_python_doc=$enableval,
+ enable_python_doc=no)
+
+if test "x$enable_python_doc" = "xyes" && test "x$enable_python" = "xno"; then
+ AC_MSG_ERROR([--enable-python-doc requires --enable-python])
+fi
+
+AC_MSG_RESULT($enable_python_doc)
+
+if test "x$enable_python_doc" = "xyes" ; then
+ AC_MSG_CHECKING([for epydoc])
+ if epydoc --version >/dev/null 2>/dev/null ; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_ERROR([epydoc (http://epydoc.sourceforge.net/) is needed to build Python documentation])
+ fi
+
+ AC_MSG_CHECKING([for pygments])
+ if pygmentize -V >/dev/null 2>/dev/null ; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_ERROR([pygments (http://pygments.org/) is needed to build Python documentation])
+ fi
+fi
+AM_CONDITIONAL([ENABLE_PYTHON_DOC], test "x$enable_python_doc" = "xyes")
+dnl }}}
+
dnl {{{ vim
AC_MSG_CHECKING([whether to install Vim scripts])
AC_ARG_ENABLE([vim],
diff --git a/doc/api/python/Makefile.am b/doc/api/python/Makefile.am
index f759c36..cadc146 100644
--- a/doc/api/python/Makefile.am
+++ b/doc/api/python/Makefile.am
@@ -14,7 +14,7 @@ EXTRA_DIST = epydoc.css \
dist_noinst_SCRIPTS = create_python_examples.py
-if ENABLE_PYTHON
+if ENABLE_PYTHON_DOC
all-local : epydoc
@@ -48,7 +48,7 @@ install-data-local :
else
epydoc :
- @echo "You don't have python turned on!"
+ @echo "You don't have python-doc turned on!"
exit 1
endif