Sphinx.make 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. APIDOC := $(shell sphinx-apidoc2 --help 2>/dev/null)
  2. ifdef APIDOC
  3. SPHINXAPIDOC = sphinx-apidoc2
  4. else
  5. APIDOC := $(shell sphinx-apidoc --help 2>/dev/null)
  6. ifdef APIDOC
  7. SPHINXAPIDOC = sphinx-apidoc
  8. endif
  9. endif
  10. BUILD := $(shell sphinx-build2 --version 2>/dev/null)
  11. ifdef BUILD
  12. SPHINXBUILD = sphinx-build2
  13. else
  14. BUILD := $(shell sphinx-build --version 2>/dev/null)
  15. ifdef BUILD
  16. SPHINXBUILD = sphinx-build
  17. endif
  18. endif
  19. checksphinx:
  20. @echo $(SPHINXBUILD)
  21. @echo $(SPHINXAPIDOC)
  22. @(type $(SPHINXBUILD) > /dev/null || (echo "ERROR: Install 'sphinx-build' software first (get from http://sphinx-doc.org)" && exit 1))
  23. @(type $(SPHINXAPIDOC) > /dev/null || (echo "ERROR: Install 'sphinx-apidoc' software first (get from http://sphinx-doc.org)" && exit 1))
  24. DOCSDIR = $(MODULE_TOPDIR)/python/grass/docs/
  25. cleansphinx:
  26. $(MAKE) -C $(MODULE_TOPDIR)/gui/wxpython/docs/wxgui_sphinx/ wxguiclean
  27. $(MAKE) -C $(DOCSDIR) libpythonclean
  28. sphinxdoc: checksphinx cleansphinx
  29. $(MAKE) -C $(MODULE_TOPDIR)/gui/wxpython/docs/wxgui_sphinx/ wxguiapidoc
  30. $(MAKE) -C $(MODULE_TOPDIR)/gui/wxpython/docs/wxgui_sphinx/ wxguihtml
  31. $(MAKE) -C $(DOCSDIR) libpythonapidoc
  32. $(MAKE) -C $(DOCSDIR) libpythonhtml
  33. sphinxman:checksphinx cleansphinx
  34. $(MAKE) -C $(MODULE_TOPDIR)/gui/wxpython/docs/wxgui_sphinx/ wxguiapidoc
  35. $(MAKE) -C $(MODULE_TOPDIR)/gui/wxpython/docs/wxgui_sphinx/ wxguiman
  36. $(MAKE) -C $(DOCSDIR) libpythonapidoc
  37. $(MAKE) -C $(DOCSDIR) libpythonman
  38. cleansphinxlib:
  39. $(MAKE) -C $(DOCSDIR) libpythonclean
  40. sphinxdoclib: checksphinx cleansphinxlib
  41. $(MAKE) -C $(DOCSDIR) libpythonapidoc
  42. $(MAKE) -C $(DOCSDIR) libpythonhtml
  43. sphinxmanlib:checksphinx cleansphinxlib
  44. $(MAKE) -C $(DOCSDIR) libpythonapidoc
  45. $(MAKE) -C $(DOCSDIR) libpythonman