Ensure we only remove autodoc files on clean command.

This commit is contained in:
Mike Auty
2019-09-19 22:42:06 +01:00
parent 3bb2e50f2c
commit aae1623696
2 changed files with 6 additions and 7 deletions
+6 -1
View File
@@ -13,7 +13,12 @@ help:
.PHONY: help Makefile
# Ensure we clean the autodoc files when we clean
clean:
-rm source/volatility.*.rst
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-6
View File
@@ -23,12 +23,6 @@ import sphinx.ext.apidoc
def setup(app):
volatility_directory = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'volatility'))
# Ensure autodoc regenerates based on the current tree
for dir, _, files in os.walk(os.path.dirname(__file__)):
for filename in files:
if filename.startswith('volatility.'):
os.unlink(os.path.join(dir, filename))
sphinx.ext.apidoc.main(argv = ['-e', '-M', '-f', '-T', '-o', 'source', volatility_directory])
# Go through the volatility.framework.plugins files and change them to volatility.plugins