summaryrefslogtreecommitdiff
path: root/Cython/Compiler/Main.py
diff options
context:
space:
mode:
Diffstat (limited to 'Cython/Compiler/Main.py')
-rw-r--r--Cython/Compiler/Main.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py
index 128441da6..9c57452ba 100644
--- a/Cython/Compiler/Main.py
+++ b/Cython/Compiler/Main.py
@@ -514,6 +514,10 @@ def run_pipeline(source, options, full_module_name=None, context=None):
context.setup_errors(options, result)
err, enddata = Pipeline.run_pipeline(pipeline, source)
context.teardown_errors(err, options, result)
+ if options.depfile:
+ from ..Build.Dependencies import create_dependency_tree
+ dependencies = create_dependency_tree(context).all_dependencies(result.main_source_file)
+ Utils.write_depfile(result.c_file, result.main_source_file, dependencies)
return result
@@ -881,6 +885,7 @@ default_options = dict(
errors_to_stderr = 1,
cplus = 0,
output_file = None,
+ depfile = None,
annotate = None,
annotate_coverage_xml = None,
generate_pxi = 0,