diff options
author | Ryan Lortie <desrt@desrt.ca> | 2013-12-21 22:18:48 -0500 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2013-12-21 22:18:48 -0500 |
commit | ce190a6bd3e6f4443eb346745807695aaebe907d (patch) | |
tree | e4e98fe3058b26d944161a53d1e00882b4294135 | |
parent | eb13b2bf9ac7b3cf08365906e6a03dcd74ce0922 (diff) | |
download | gobject-introspection-ce190a6bd3e6f4443eb346745807695aaebe907d.tar.gz |
Honour CPPFLAGS as we do CFLAGS
In all of the places that we pass through the CFLAGS, we should be doing
the same with the CPPFLAGS.
https://bugzilla.gnome.org/show_bug.cgi?id=720063
-rw-r--r-- | giscanner/dumper.py | 6 | ||||
-rw-r--r-- | giscanner/sourcescanner.py | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/giscanner/dumper.py b/giscanner/dumper.py index ff6c4c12..b415dd13 100644 --- a/giscanner/dumper.py +++ b/giscanner/dumper.py @@ -215,6 +215,9 @@ class DumpCompiler(object): args.append("-Wno-deprecated-declarations") pkgconfig_flags = self._run_pkgconfig('--cflags') args.extend([utils.cflag_real_include_path(f) for f in pkgconfig_flags]) + cppflags = os.environ.get('CPPFLAGS', '') + for cppflag in cppflags.split(): + args.append(cppflag) cflags = os.environ.get('CFLAGS', '') for cflag in cflags.split(): args.append(cflag) @@ -263,6 +266,9 @@ class DumpCompiler(object): else: args.append('-export-dynamic') + cppflags = os.environ.get('CPPFLAGS', '') + for cppflag in cppflags.split(): + args.append(cppflag) cflags = os.environ.get('CFLAGS', '') for cflag in cflags.split(): args.append(cflag) diff --git a/giscanner/sourcescanner.py b/giscanner/sourcescanner.py index 9a8bd41b..dab16027 100644 --- a/giscanner/sourcescanner.py +++ b/giscanner/sourcescanner.py @@ -289,6 +289,7 @@ class SourceScanner(object): # Note that the generated dumper program is # still built and linked by Visual C++. cpp_args = ['gcc'] + cpp_args += os.environ.get('CPPFLAGS', '').split() cpp_args += os.environ.get('CFLAGS', '').split() cpp_args += ['-E', '-C', '-I.', '-'] cpp_args += self._cpp_options |