Commits

Anonymous committed 7bdf7b2

メインのリポジトリをサブリポジトリとして追加し、そのサンプルを流用

Comments (0)

Files changed (6)

+main_repo = https://bitbucket.org/tkf/railgun
+1a19367106bab6f6c7d9a64a99d3e013709cdda8 main_repo
 PAPEROPT_letter = -D latex_paper_size=letter
 ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
 
-.PHONY: help clean clean-html html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest samples samples-clean
 
 help:
 	@echo "Please use \`make <target>' where <target> is one of"
 	@echo "  linkcheck  to check all external links for integrity"
 	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
 
-clean:
-	-rm -rf $(BUILDDIR)/*
+clean: samples-clean
+	-rm -rf $(BUILDDIR)/*/* $(BUILDDIR)/*/.*
 
-clean-html:
-	-rm -rf $(BUILDDIR)/html/*
-
-html:
+html: samples
 	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
 	@echo
 	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
 	@echo
 	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
 
-latex:
+latex: samples
 	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
 	@echo
 	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
 	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
 	@echo "Testing of doctests in the sources finished, look at the " \
 	      "results in $(BUILDDIR)/doctest/output.txt."
+
+
+samples:
+	for sdir in source/samples/*; do \
+		[ -e $$sdir/Makefile ] && make -C $$sdir; \
+		done
+
+samples-clean:
+	for sdir in source/samples/*; do \
+		[ -e $$sdir/Makefile ] && make -C $$sdir clean; \
+		done
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = []
+extensions = [
+    'sphinx.ext.pngmath',
+    'matplotlib.sphinxext.only_directives',
+    'matplotlib.sphinxext.plot_directive',
+    ]
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
    tutorial
    simobj
    utils
+   samples/index
 
 リンク
 ------
-- `サンプルコード <http://tkf.bitbucket.org/railgun-doc/samples/>`_
 - `リポジトリ <http://bitbucket.org/tkf/railgun/src>`_
 - `バグ報告 <https://bitbucket.org/tkf/railgun/issues>`_
 - `英語版のドキュメント <http://tkf.bitbucket.org/railgun-doc/>`_
+../main_repo/samples