diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2001-07-16 14:19:20 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2001-07-16 14:19:20 (GMT) |
commit | 286b107bea83c10075e263f02a1795beb7de8e70 (patch) | |
tree | 6d7b0d9886b7766e40468597cabecaeb83a4ace9 /Lib/distutils | |
parent | ced2366a05d0b519885df4ebb70ee67564c1fb79 (diff) | |
download | cpython-286b107bea83c10075e263f02a1795beb7de8e70.zip cpython-286b107bea83c10075e263f02a1795beb7de8e70.tar.gz cpython-286b107bea83c10075e263f02a1795beb7de8e70.tar.bz2 |
[Bug #441527] Fixes for preprocessor support, contributed by Tarn
Weisner Burton
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/unixccompiler.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py index 9ecfb6d..91e7d5e 100644 --- a/Lib/distutils/unixccompiler.py +++ b/Lib/distutils/unixccompiler.py @@ -99,12 +99,13 @@ class UnixCCompiler (CCompiler): if extra_preargs: pp_args[:0] = extra_preargs if extra_postargs: - extra_postargs.extend(extra_postargs) + pp_args.extend(extra_postargs) - # We need to preprocess: either we're being forced to, or the - # source file is newer than the target (or the target doesn't + # We need to preprocess: either we're being forced to, or we're + # generating output to stdout, or there's a target output file and + # the source file is newer than the target (or the target doesn't # exist). - if self.force or (output_file and newer(source, output_file)): + if self.force or output_file is None or newer(source, output_file)): if output_file: self.mkpath(os.path.dirname(output_file)) try: |