[Groonga-commit] groonga/groonga at 9a291ab [master] doc: use system sphinx-build instead of hg clone

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Jun 5 11:57:35 JST 2014


Kouhei Sutou	2014-06-05 11:57:35 +0900 (Thu, 05 Jun 2014)

  New Revision: 9a291abbfae8542434447064325fa1d7f367bb2c
  https://github.com/groonga/groonga/commit/9a291abbfae8542434447064325fa1d7f367bb2c

  Message:
    doc: use system sphinx-build instead of hg clone
    
    Because it is hard to resolve Sphinx dependency by hand. :<

  Modified files:
    build/makefiles/gettext.am
    build/makefiles/sphinx-build.am
    build/makefiles/sphinx.am
    configure.ac

  Modified: build/makefiles/gettext.am (+1 -1)
===================================================================
--- build/makefiles/gettext.am    2014-06-05 11:19:56 +0900 (0eb6acb)
+++ build/makefiles/gettext.am    2014-06-05 11:57:35 +0900 (50e2c3e)
@@ -39,7 +39,7 @@ html: build
 man: build
 pdf: build
 
-gettext: sphinx-ensure-updated
+gettext:
 	rm *.pot || true
 	$(SPHINX_BUILD_COMMAND) -d doctrees -b gettext $(ALLSPHINXOPTS) .
 	xgettext --language Python --output conf.pot ../../../source/conf.py

  Modified: build/makefiles/sphinx-build.am (+1 -17)
===================================================================
--- build/makefiles/sphinx-build.am    2014-06-05 11:19:56 +0900 (1a8e4a0)
+++ build/makefiles/sphinx-build.am    2014-06-05 11:57:35 +0900 (e237377)
@@ -11,25 +11,9 @@ PAPEROPT_letter = -D latex_paper_size=letter
 ALLSPHINXOPTS   = $(PAPEROPT_$(PAPER)) -E $(SPHINXOPTS) $(SOURCE_DIR)
 
 SPHINX_DIR = $(abs_top_builddir)/doc/sphinx
-SPHINX_BUILD = $(SPHINX_DIR)/sphinx-build.py
 SPHINX_BUILD_COMMAND =				\
 	DOCUMENT_VERSION="$(DOCUMENT_VERSION)"		\
 	DOCUMENT_VERSION_FULL="$(DOCUMENT_VERSION_FULL)"	\
 	LOCALE="$(LOCALE)"			\
 	PYTHONPATH="$(SPHINX_DIR):$$PYTHONPATH"	\
-	python $(SPHINX_BUILD)
-
-.PHONY: sphinx-ensure-updated
-
-if DOCUMENT_BUILDABLE
-sphinx-ensure-updated:
-	if ! $(SPHINX_BUILD_COMMAND) --version | grep -q ' 1\.[23]' > /dev/null; then \
-	  if test -d $(SPHINX_DIR); then						 \
-	    (cd $(SPHINX_DIR) && $(HG) pull --update);					 \
-	  else										 \
-	    $(HG) clone https://bitbucket.org/birkenfeld/sphinx $(SPHINX_DIR);		 \
-	  fi;										 \
-	fi
-else
-sphinx-ensure-updated:
-endif
+	$(SPHINX_BUILD)

  Modified: build/makefiles/sphinx.am (+0 -1)
===================================================================
--- build/makefiles/sphinx.am    2014-06-05 11:19:56 +0900 (77b17e8)
+++ build/makefiles/sphinx.am    2014-06-05 11:57:35 +0900 (f84fb23)
@@ -154,7 +154,6 @@ build_stamps =					\
 	doctest-build-stamp
 
 $(build_stamps): $(document_source_files)
-	$(MAKE) sphinx-ensure-updated
 	target=`echo $@ | sed -e 's/-build-stamp$$//'`;	\
 	  $(SPHINX_BUILD_COMMAND)			\
 	    -Dlanguage=$(LOCALE)			\

  Modified: configure.ac (+22 -4)
===================================================================
--- configure.ac    2014-06-05 11:19:56 +0900 (0c6be46)
+++ configure.ac    2014-06-05 11:57:35 +0900 (85fbfb2)
@@ -1116,14 +1116,32 @@ if test x"$enable_document" != x"no"; then
   fi
 
   if test x"$enable_document" = x"yes"; then
-    AC_PATH_PROG(HG, hg, [])
-    if test -n "$HG"; then
+    AC_PATH_PROG(SPHINX_BUILD, sphinx-build, [])
+    if test -n "$SPHINX_BUILD"; then
+      sphinx_build_version=`"$SPHINX_BUILD" --version`
+      if ! echo "$sphinx_build_version" | grep -q ' 1\.[[23]]'; then
+	AC_MSG_ERROR([
+sphinx-build is old: $sphinx_build_version
+Sphinx 1.2 or later is required.])
+      fi
       document_available=yes
       document_buildable=yes
     else
-      AC_MSG_ERROR("No hg found")
+      AC_MSG_ERROR([
+No sphinx-build found.
+Install it and try again.
+
+How to install sphinx-build:
+
+For Debian GNU/Linux based system like Ubuntu:
+  % sudo apt-get install -y python-pip
+  % sudo pip install sphinx
+
+For Red Hat based system like CentOS:
+  % sudo yum install -y python-pip
+  % sudo pip install sphinx])
     fi
-    AC_SUBST(HG)
+    AC_SUBST(SPHINX_BUILD)
   fi
 fi
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index