From ce190a6bd3e6f4443eb346745807695aaebe907d Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Sat, 21 Dec 2013 22:18:48 -0500 Subject: 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 --- giscanner/dumper.py | 6 ++++++ giscanner/sourcescanner.py | 1 + 2 files changed, 7 insertions(+) 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 -- cgit v1.2.1