summaryrefslogtreecommitdiff
path: root/giscanner/sourcescanner.py
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2013-04-12 07:31:55 +0200
committerDieter Verfaillie <dieterv@optionexplicit.be>2013-05-07 15:36:09 +0200
commit44ff0d355021f527a518d320f403aa0717fd0bc8 (patch)
tree8a1c61416f9cecc2e3f70ebcfb5396d26e7ae12f /giscanner/sourcescanner.py
parentb70fe6a5649ed037f2554ae13067fd9929d841f8 (diff)
downloadgobject-introspection-44ff0d355021f527a518d320f403aa0717fd0bc8.tar.gz
giscanner: small cpp_args cleanup
No need for two variables... https://bugzilla.gnome.org/show_bug.cgi?id=699533
Diffstat (limited to 'giscanner/sourcescanner.py')
-rw-r--r--giscanner/sourcescanner.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/giscanner/sourcescanner.py b/giscanner/sourcescanner.py
index a1103a10..736ddbd4 100644
--- a/giscanner/sourcescanner.py
+++ b/giscanner/sourcescanner.py
@@ -278,19 +278,17 @@ class SourceScanner(object):
defines = ['__GI_SCANNER__']
undefs = []
- cpp_exec = os.environ.get('CC', 'cc').split()
- # The Microsoft compiler/preprocessor (cl) does not accept
- # source input from stdin (the '-' flag), so we need
- # some help from gcc from MinGW/Cygwin or so.
- # Note that the generated dumper program is
- # still built and linked by Visual C++.
- if 'cl' in cpp_exec:
- cpp_args = 'gcc'.split()
- else:
- cpp_args = cpp_exec
+ cpp_args = os.environ.get('CC', 'cc').split() # support CC="ccache gcc"
+ if 'cl' in cpp_args:
+ # The Microsoft compiler/preprocessor (cl) does not accept
+ # source input from stdin (the '-' flag), so we need
+ # some help from gcc from MinGW/Cygwin or so.
+ # Note that the generated dumper program is
+ # still built and linked by Visual C++.
+ cpp_args = ['gcc']
cpp_args += ['-E', '-C', '-I.', '-']
-
cpp_args += self._cpp_options
+
proc = subprocess.Popen(cpp_args,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE)