浏览代码

pygrass doc: generate pygrass doc in the main grass documentation directory

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60442 15284696-431f-4ddb-bdfa-cd5b030d7da7
Luca Delucchi 11 年之前
父节点
当前提交
7eb38fae8a
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      man/Makefile

+ 11 - 0
man/Makefile

@@ -34,11 +34,13 @@ default: $(DSTFILES)
 	$(MAKE) $(INDICES)
 	$(MAKE) $(INDICES)
 	$(call build,check)
 	$(call build,check)
 	$(MAKE) manpages
 	$(MAKE) manpages
+	@(type sphinx-build > /dev/null && $(call run_pygrass_html) || (echo "WARNING: pygrass documentation not compiled because 'sphinx-build' software not installed (get from http://www.sphinx.org)") ; exit 0)
 
 
 # This must be a separate target so that evaluation of $(MANPAGES)
 # This must be a separate target so that evaluation of $(MANPAGES)
 # is delayed until the indices have been generated
 # is delayed until the indices have been generated
 manpages:
 manpages:
 	$(MAKE) $(MANPAGES)
 	$(MAKE) $(MANPAGES)
+	@(type sphinx-build > /dev/null && $(call run_pygrass_man) || (echo "WARNING: pygrass documentation not compiled because 'sphinx-build' software not installed (get from http://www.sphinx.org)") ; exit 0)
 
 
 .PHONY: manpages
 .PHONY: manpages
 
 
@@ -60,6 +62,14 @@ GISBASE="$(RUN_GISBASE)" ARCH="$(ARCH)" ARCH_DISTDIR="$(ARCH_DISTDIR)" \
 	$(PYTHON) ./build_keywords.py $(HTMLDIR)
 	$(PYTHON) ./build_keywords.py $(HTMLDIR)
 endef
 endef
 
 
+define run_pygrass_html
+$(MAKE) -C ../lib/python/pygrass/docs/ html
+endef
+
+define run_pygrass_man
+$(MAKE) -C ../lib/python/pygrass/docs/ man
+endef
+
 $(HTMLDIR)/topics.html: $(ALL_HTML)
 $(HTMLDIR)/topics.html: $(ALL_HTML)
 	$(call build_topics)
 	$(call build_topics)
 	touch $@
 	touch $@
@@ -92,3 +102,4 @@ $(HTMLDIR)/grass_logo.png: grass_logo.png
 
 
 $(HTMLDIR)/grass_icon.png: grass_icon.png
 $(HTMLDIR)/grass_icon.png: grass_icon.png
 	$(INSTALL_DATA) $< $@
 	$(INSTALL_DATA) $< $@
+