summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/ccompiler.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-06-21 02:58:46 (GMT)
committerGreg Ward <gward@python.net>2000-06-21 02:58:46 (GMT)
commit3ff3b039ac25f70cf6be3775dca0e21c2666d3d3 (patch)
treed229a2ee9257400ec6f6cf234ea1772e6ceaf0fa /Lib/distutils/ccompiler.py
parenta4ca07cc8c4626e5e9b94f27da75959bba14ffac (diff)
downloadcpython-3ff3b039ac25f70cf6be3775dca0e21c2666d3d3.zip
cpython-3ff3b039ac25f70cf6be3775dca0e21c2666d3d3.tar.gz
cpython-3ff3b039ac25f70cf6be3775dca0e21c2666d3d3.tar.bz2
Added 'preprocess()' method to CCompiler interface, and implemented
it in UnixCCompiler. Still needs to be implemented in MSVCCompiler (and whatever other compiler classes are lurking out there, waiting to be checked in).
Diffstat (limited to 'Lib/distutils/ccompiler.py')
-rw-r--r--Lib/distutils/ccompiler.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py
index b146f89..53d4fa5 100644
--- a/Lib/distutils/ccompiler.py
+++ b/Lib/distutils/ccompiler.py
@@ -414,6 +414,22 @@ class CCompiler:
# -- Worker methods ------------------------------------------------
# (must be implemented by subclasses)
+ def preprocess (self,
+ source,
+ output_file=None,
+ macros=None,
+ include_dirs=None,
+ extra_preargs=None,
+ extra_postargs=None):
+ """Preprocess a single C/C++ source file, named in 'source'.
+ Output will be written to file named 'output_file', or stdout if
+ 'output_file' not supplied. 'macros' is a list of macro
+ definitions as for 'compile()', which will augment the macros set
+ with 'define_macro()' and 'undefine_macro()'. 'include_dirs' is a
+ list of directory names that will be added to the default list.
+ """
+ pass
+
def compile (self,
sources,
output_dir=None,