[GRASS-SVN] r61152 - in grass/trunk: gui/wxpython/docs/wxgui_sphinx gui/wxpython/docs/wxgui_sphinx/src include/Make lib/python/docs

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jul 4 03:32:10 PDT 2014


Author: lucadelu
Date: 2014-07-04 03:32:10 -0700 (Fri, 04 Jul 2014)
New Revision: 61152

Added:
   grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/
   grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/index.rst
   grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/wxgui_libraries.rst
   grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/wxgui_tools.rst
Removed:
   grass/trunk/gui/wxpython/docs/wxgui_sphinx/index.rst
   grass/trunk/gui/wxpython/docs/wxgui_sphinx/wxgui_libraries.rst
   grass/trunk/gui/wxpython/docs/wxgui_sphinx/wxgui_tools.rst
Modified:
   grass/trunk/gui/wxpython/docs/wxgui_sphinx/Makefile
   grass/trunk/include/Make/Sphinx.make
   grass/trunk/lib/python/docs/Makefile
Log:
sphinx documentation: fix requirements check; move rst files into src/ directory for wxgui

Modified: grass/trunk/gui/wxpython/docs/wxgui_sphinx/Makefile
===================================================================
--- grass/trunk/gui/wxpython/docs/wxgui_sphinx/Makefile	2014-07-04 10:00:33 UTC (rev 61151)
+++ grass/trunk/gui/wxpython/docs/wxgui_sphinx/Makefile	2014-07-04 10:32:10 UTC (rev 61152)
@@ -6,7 +6,27 @@
 
 # You can set these variables from the command line.
 SPHINXOPTS    =
+APIDOC := $(shell sphinx-apidoc2 --help 2>/dev/null)
+ifdef APIDOC
+SPHINXAPIDOC = sphinx-apidoc2
+else
+    APIDOC := $(shell sphinx-apidoc --help 2>/dev/null)
+    ifdef APIDOC
+	SPHINXAPIDOC = sphinx-apidoc
+    endif
+endif
 
+BUILD := $(shell sphinx-build2 --version 2>/dev/null)
+ifdef BUILD
+    SPHINXBUILD = sphinx-build2
+else
+    BUILD := $(shell sphinx-build --version 2>/dev/null)
+    ifdef BUILD
+	SPHINXBUILD = sphinx-build
+    endif
+endif
+
+
 PAPER         =
 BUILDDIR      = _build
 BUILDDIR_HTML = $(HTMLDIR)/wxgui
@@ -16,7 +36,7 @@
 # Internal variables.
 PAPEROPT_a4     = -D latex_paper_size=a4
 PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) -c . src/
 # the i18n builder cannot share the environment and doctrees with the others
 I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
 
@@ -24,21 +44,7 @@
 
 .DEFAULT_GOAL := help
 
-ifneq (@(type sphinx-apidoc2 > /dev/null),)
-SPHINXAPIDOC   = sphinx-apidoc2
-endif
-ifneq (@(type sphinx-apidoc > /dev/null),)
-SPHINXAPIDOC   = sphinx-apidoc
-endif
 
-ifneq (@(type sphinx-build2 > /dev/null),)
-SPHINXBUILD   = sphinx-build2
-endif
-ifneq (@(type sphinx-build > /dev/null),)
-SPHINXBUILD   = sphinx-build
-endif
-
-
 wxguihelp:
 	@echo "Please use \`make <target>' where <target> is one of"
 	@echo "  html       to make standalone HTML files"
@@ -52,10 +58,28 @@
 
 wxguiclean:
 	-rm -rf $(BUILDDIR)/*
+	-rm -rf src/a*.rst
+	-rm -rf src/c*.rst
+	-rm -rf src/d*.rst
+	-rm -rf src/g*.rst
+	-rm -rf src/ic*.rst
+	-rm -rf src/is*.rst
+	-rm -rf src/l*.rst
+	-rm -rf src/m*.rst
+	-rm -rf src/n*.rst
+	-rm -rf src/p*.rst
+	-rm -rf src/r*.rst
+	-rm -rf src/t*.rst
+	-rm -rf src/v*.rst
+	-rm -rf src/web_services.rst
+	-rm -rf src/wxgui.rst
+	-rm -rf src/wxplot.rst
 	-rm -f _templates/layout.html
 
 wxguiapidoc:
-	$(call run_grass, $(SPHINXAPIDOC) -T -f -o . ../../)
+	@echo $(SPHINXAPIDOC)
+	@echo $(SPHINXBUILD)
+	$(call run_grass,$(SPHINXAPIDOC) -T -f -o src/ ../../)
 	
 wxguihtml:
 	$(call run_grass,$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR_HTML))

Deleted: grass/trunk/gui/wxpython/docs/wxgui_sphinx/index.rst
===================================================================
--- grass/trunk/gui/wxpython/docs/wxgui_sphinx/index.rst	2014-07-04 10:00:33 UTC (rev 61151)
+++ grass/trunk/gui/wxpython/docs/wxgui_sphinx/index.rst	2014-07-04 10:32:10 UTC (rev 61152)
@@ -1,22 +0,0 @@
-.. wxGUI documentation master file, created by
-   sphinx-quickstart on Tue Jun  3 09:20:51 2014.
-   You can adapt this file completely to your liking, but it should at least
-   contain the root `toctree` directive.
-
-wxGUI documentation
-=================================
-
-.. toctree::
-  :maxdepth: 2
-
-  wxgui_libraries
-  wxgui_tools
-
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
-

Copied: grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/index.rst (from rev 61134, grass/trunk/gui/wxpython/docs/wxgui_sphinx/index.rst)
===================================================================
--- grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/index.rst	                        (rev 0)
+++ grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/index.rst	2014-07-04 10:32:10 UTC (rev 61152)
@@ -0,0 +1,22 @@
+.. wxGUI documentation master file, created by
+   sphinx-quickstart on Tue Jun  3 09:20:51 2014.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+wxGUI documentation
+=================================
+
+.. toctree::
+  :maxdepth: 2
+
+  wxgui_libraries
+  wxgui_tools
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+

Copied: grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/wxgui_libraries.rst (from rev 61134, grass/trunk/gui/wxpython/docs/wxgui_sphinx/wxgui_libraries.rst)
===================================================================
--- grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/wxgui_libraries.rst	                        (rev 0)
+++ grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/wxgui_libraries.rst	2014-07-04 10:32:10 UTC (rev 61152)
@@ -0,0 +1,23 @@
+Libraries
+==================
+
+.. toctree::
+  :maxdepth: 2
+
+  core
+  gis_set
+  gis_set_error
+  gui_core
+  icons
+  iscatt
+  lmgr
+  location_wizard
+  mapdisp
+  mapwin
+  menustrings
+  modules
+  nviz
+  vnet
+  web_services
+  wxgui
+  wxplot
\ No newline at end of file

Copied: grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/wxgui_tools.rst (from rev 61134, grass/trunk/gui/wxpython/docs/wxgui_sphinx/wxgui_tools.rst)
===================================================================
--- grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/wxgui_tools.rst	                        (rev 0)
+++ grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/wxgui_tools.rst	2014-07-04 10:32:10 UTC (rev 61152)
@@ -0,0 +1,16 @@
+Tools
+===========
+
+.. toctree::
+  :maxdepth: 2
+
+  animation
+  dbmgr
+  gcp
+  gmodeler
+  iclass
+  mapswipe
+  psmap
+  rlisetup
+  timeline
+  vdigit
\ No newline at end of file

Deleted: grass/trunk/gui/wxpython/docs/wxgui_sphinx/wxgui_libraries.rst
===================================================================
--- grass/trunk/gui/wxpython/docs/wxgui_sphinx/wxgui_libraries.rst	2014-07-04 10:00:33 UTC (rev 61151)
+++ grass/trunk/gui/wxpython/docs/wxgui_sphinx/wxgui_libraries.rst	2014-07-04 10:32:10 UTC (rev 61152)
@@ -1,23 +0,0 @@
-Libraries
-==================
-
-.. toctree::
-  :maxdepth: 2
-
-  core
-  gis_set
-  gis_set_error
-  gui_core
-  icons
-  iscatt
-  lmgr
-  location_wizard
-  mapdisp
-  mapwin
-  menustrings
-  modules
-  nviz
-  vnet
-  web_services
-  wxgui
-  wxplot
\ No newline at end of file

Deleted: grass/trunk/gui/wxpython/docs/wxgui_sphinx/wxgui_tools.rst
===================================================================
--- grass/trunk/gui/wxpython/docs/wxgui_sphinx/wxgui_tools.rst	2014-07-04 10:00:33 UTC (rev 61151)
+++ grass/trunk/gui/wxpython/docs/wxgui_sphinx/wxgui_tools.rst	2014-07-04 10:32:10 UTC (rev 61152)
@@ -1,16 +0,0 @@
-Tools
-===========
-
-.. toctree::
-  :maxdepth: 2
-
-  animation
-  dbmgr
-  gcp
-  gmodeler
-  iclass
-  mapswipe
-  psmap
-  rlisetup
-  timeline
-  vdigit
\ No newline at end of file

Modified: grass/trunk/include/Make/Sphinx.make
===================================================================
--- grass/trunk/include/Make/Sphinx.make	2014-07-04 10:00:33 UTC (rev 61151)
+++ grass/trunk/include/Make/Sphinx.make	2014-07-04 10:32:10 UTC (rev 61152)
@@ -1,18 +1,26 @@
-ifneq (@(type sphinx-apidoc2 > /dev/null),)
-SPHINXAPIDOC   = sphinx-apidoc2
+APIDOC := $(shell sphinx-apidoc2 --help 2>/dev/null)
+ifdef APIDOC
+SPHINXAPIDOC = sphinx-apidoc2
+else
+    APIDOC := $(shell sphinx-apidoc --help 2>/dev/null)
+    ifdef APIDOC
+	SPHINXAPIDOC = sphinx-apidoc
+    endif
 endif
-ifneq (@(type sphinx-apidoc > /dev/null),)
-SPHINXAPIDOC   = sphinx-apidoc
-endif
 
-ifneq (@(type sphinx-build2 > /dev/null),)
-SPHINXBUILD   = sphinx-build2
+BUILD := $(shell sphinx-build2 --version 2>/dev/null)
+ifdef BUILD
+    SPHINXBUILD = sphinx-build2
+else
+    BUILD := $(shell sphinx-build --version 2>/dev/null)
+    ifdef BUILD
+	SPHINXBUILD = sphinx-build
+    endif
 endif
-ifneq (@(type sphinx-build > /dev/null),)
-SPHINXBUILD   = sphinx-build
-endif
 
 checksphinx:
+	@echo $(SPHINXBUILD)
+	@echo $(SPHINXAPIDOC)
 	@(type $(SPHINXBUILD) > /dev/null || (echo "ERROR: Install 'sphinx-build' software first (get from http://sphinx-doc.org)" && exit 1))
 	@(type $(SPHINXAPIDOC) > /dev/null || (echo "ERROR: Install 'sphinx-apidoc' software first (get from http://sphinx-doc.org)" && exit 1))
 

Modified: grass/trunk/lib/python/docs/Makefile
===================================================================
--- grass/trunk/lib/python/docs/Makefile	2014-07-04 10:00:33 UTC (rev 61151)
+++ grass/trunk/lib/python/docs/Makefile	2014-07-04 10:32:10 UTC (rev 61152)
@@ -6,12 +6,27 @@
 
 # You can set these variables from the command line.
 SPHINXOPTS    =
-ifneq (@(type sphinx-build2 > /dev/null),)
-SPHINXBUILD   = sphinx-build2
+APIDOC := $(shell sphinx-apidoc2 --help 2>/dev/null)
+ifdef APIDOC
+SPHINXAPIDOC = sphinx-apidoc2
+else
+    APIDOC := $(shell sphinx-apidoc --help 2>/dev/null)
+    ifdef APIDOC
+	SPHINXAPIDOC = sphinx-apidoc
+    endif
 endif
-ifneq (@(type sphinx-build > /dev/null),)
-SPHINXBUILD   = sphinx-build
+
+BUILD := $(shell sphinx-build2 --version 2>/dev/null)
+ifdef BUILD
+    SPHINXBUILD = sphinx-build2
+else
+    BUILD := $(shell sphinx-build --version 2>/dev/null)
+    ifdef BUILD
+	SPHINXBUILD = sphinx-build
+    endif
 endif
+
+
 PAPER         =
 BUILDDIR      = _build
 BUILDDIR_HTML = $(HTMLDIR)/libpython
@@ -51,12 +66,12 @@
 	-rm -f src/temporal.rst
 
 libpythonapidoc:
-#	$(call run_grass, sphinx-apidoc -T -f -o src/ ../ctypes/)
-	$(call run_grass,sphinx-apidoc -T -f -o src/ ../imaging/)
-	$(call run_grass,sphinx-apidoc -T -f -o src/ ../pydispatch/)
-	$(call run_grass,sphinx-apidoc -T -f -o src/ ../pygrass/)
-	$(call run_grass,sphinx-apidoc -T -f -o src/ ../script/)
-	$(call run_grass,sphinx-apidoc -T -f -o src/ ../temporal/)
+	@echo $(SPHINXAPIDOC)
+	$(call run_grass,$(SPHINXAPIDOC) -T -f -o src/ ../imaging/)
+	$(call run_grass,$(SPHINXAPIDOC) -T -f -o src/ ../pydispatch/)
+	$(call run_grass,$(SPHINXAPIDOC) -T -f -o src/ ../pygrass/)
+	$(call run_grass,$(SPHINXAPIDOC) -T -f -o src/ ../script/)
+	$(call run_grass,$(SPHINXAPIDOC) -T -f -o src/ ../temporal/)
 	
 libpythonhtml:
 	$(call run_grass,$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR_HTML))



More information about the grass-commit mailing list