chiark / gitweb /
build-sys: make sphinx support uncoditional
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 20 Feb 2013 08:20:35 +0000 (09:20 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 1 Mar 2013 01:04:17 +0000 (20:04 -0500)
It needs to be invoked explicitly, so there's no need to check
explicitly.

Makefile.am
configure.ac

index fc7e8c4..dfe70a5 100644 (file)
@@ -3453,13 +3453,12 @@ BUILT_SOURCES += \
        src/python-systemd/id128-constants.h
 endif
 
-if ENABLE_SPHINX
 PAPER = $(shell cat /etc/papersize 2>/dev/null || echo a4)
 SPHINXOPTS = -D latex_paper_size=$(PAPER)
 sphinx-%:
+       $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
        $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/man/python-systemd/
        $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/man/python-systemd/
-endif
 
 # ------------------------------------------------------------------------------
 SED_PROCESS = \
index 5737c65..397ce82 100644 (file)
@@ -176,23 +176,11 @@ AS_IF([test "x$with_python" != "xno"], [
               PYTHON_LIBS="`$PYTHON_CONFIG --ldflags`"
               AC_SUBST(PYTHON_CFLAGS)
               AC_SUBST(PYTHON_LIBS)
+              AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build)
         ])
 ])
 AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
 
-AC_ARG_ENABLE(sphinx, AS_HELP_STRING([--enable-sphinx],
-              [use sphinx to build documentation for python-systemd]))
-AS_IF([test "x$enable_sphinx" = "xyes"], [
-        AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build)
-        AS_IF([test -z "$SPHINX_BUILD"], [
-              AC_MSG_ERROR([*** sphinx build requested, but sphinx-build not found])
-        ])
-        AS_IF([test "x$have_python_devel" != "xyes"], [
-              AC_MSG_ERROR([*** sphinx build requested, but python support not enabled])
-        ])
-])
-AM_CONDITIONAL(ENABLE_SPHINX, [test "x$enable_sphinx" = "xyes"])
-
 # ------------------------------------------------------------------------------
 
 AC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
@@ -915,7 +903,6 @@ AC_MSG_RESULT([
         Python Headers:          ${have_python_devel}
         man pages:               ${have_manpages}
         gtk-doc:                 ${enable_gtk_doc}
-        sphinx documentation:    ${enable_sphinx}
         Split /usr:              ${enable_split_usr}
         SysV compatibility:      ${SYSTEM_SYSV_COMPAT}