[SCons] 'clean' removes auto-generated .rst files from examples

This commit is contained in:
Ray Speth 2014-04-08 16:26:11 +00:00
parent beeaa21644
commit d2ff7dbaaa
5 changed files with 6 additions and 4 deletions

4
.gitignore vendored
View file

@ -34,5 +34,5 @@ config.log
*.gcno
coverage/
coverage.info
doc/sphinx/cython/examples/*.rst
doc/sphinx/matlab/examples/*.rst
doc/sphinx/cython/examples
doc/sphinx/matlab/examples

View file

@ -54,6 +54,8 @@ if 'clean' in COMMAND_LINE_TARGETS:
removeFile('.sconsign.dblite')
removeFile('include/cantera/base/config.h')
removeFile('ext/f2c_libs/arith.h')
removeDirectory('doc/sphinx/matlab/examples')
removeDirectory('doc/sphinx/cython/examples')
for name in os.listdir('.'):
if name.endswith('.msi'):
removeFile(name)

View file

@ -32,7 +32,7 @@ if localenv['sphinx_docs']:
tmpenv['script_name'] = f.name
tmpenv['script_path'] = '../../../../interfaces/cython/cantera/examples/%s/%s' % (subdir, f.name)
b = tmpenv.SubstFile('#doc/sphinx/cython/examples/%s_%s.rst' % (subdir, f.name[:-3]),
'#doc/sphinx/cython/examples/example-script.rst.in')
'#doc/sphinx/cython/example-script.rst.in')
build(b)
localenv.Depends(sphinxdocs, b)
@ -43,7 +43,7 @@ if localenv['sphinx_docs']:
tmpenv['script_name'] = f.name
tmpenv['script_path'] = '../../../../samples/matlab/%s' % f.name
b = tmpenv.SubstFile('#doc/sphinx/matlab/examples/%s.rst' % f.name[:-2],
'#doc/sphinx/matlab/examples/example-script.rst.in')
'#doc/sphinx/matlab/example-script.rst.in')
build(b)
localenv.Depends(sphinxdocs, b)