try to run the makefile from inside sphinx, which is hacky

pull/982/head
Jesse Vincent 4 years ago
parent cdba38c762
commit 6115305615
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -28,6 +28,6 @@ examples:
# Catch-all target: route all unknown targets to Sphinx using the new # Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile examples %: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

@ -70,19 +70,7 @@ def find_examples_docs(src_dir, target_dir):
def config_inited(app, config): def config_inited(app, config):
# Handle configuration settings os.system('make examples')
source_path = Path(app.srcdir, app.config.examples_source).resolve()
dest_path = Path(app.srcdir, app.config.examples_dest).resolve()
print (dest_path)
def docname(item):
"""Helper for status_iterator()."""
return str(Path(item[0]).relative_to(source_path).parent)
if os.path.isdir(dest_path):
rmtree(dest_path)
copytree(source_path, dest_path)
def setup(app): def setup(app):
app.add_config_value('examples_source', None, 'env', (PathLike, str))
app.add_config_value('examples_dest', None, 'env', (PathLike, str))
app.connect('config-inited', config_inited) app.connect('config-inited', config_inited)

@ -38,9 +38,6 @@ extensions = [
extensions.append('copy-examples') extensions.append('copy-examples')
examples_source = '../examples'
examples_dest = 'generated/examples'
# Setup the breathe extension # Setup the breathe extension
breathe_projects = { breathe_projects = {

Loading…
Cancel
Save