Bladeren bron

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 jaren geleden
bovenliggende
commit
7eb38fae8a
1 gewijzigde bestanden met toevoegingen van 11 en 0 verwijderingen
  1. 11 0
      man/Makefile

+ 11 - 0
man/Makefile

@@ -34,11 +34,13 @@ default: $(DSTFILES)
 	$(MAKE) $(INDICES)
 	$(call build,check)
 	$(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)
 # is delayed until the indices have been generated
 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
 
@@ -60,6 +62,14 @@ GISBASE="$(RUN_GISBASE)" ARCH="$(ARCH)" ARCH_DISTDIR="$(ARCH_DISTDIR)" \
 	$(PYTHON) ./build_keywords.py $(HTMLDIR)
 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)
 	$(call build_topics)
 	touch $@
@@ -92,3 +102,4 @@ $(HTMLDIR)/grass_logo.png: grass_logo.png
 
 $(HTMLDIR)/grass_icon.png: grass_icon.png
 	$(INSTALL_DATA) $< $@
+