From: Thomas Wouters Date: Thu, 19 Jul 2001 09:50:49 +0000 (+0000) Subject: Backport of AMK's checkin 1.34 and Guido's checkin 1.35: X-Git-Tag: v2.1.1~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=01c61eb66427b9443d42e719a80997af79c88084;p=thirdparty%2FPython%2Fcpython.git Backport of AMK's checkin 1.34 and Guido's checkin 1.35: [Bug #441527] Fixes for preprocessor support, contributed by Tarn Weisner Burton --- diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py index 9ecfb6d13b50..8a471ec06dc5 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: