[gobject-introspection] Honour CPPFLAGS as we do CFLAGS



commit ce190a6bd3e6f4443eb346745807695aaebe907d
Author: Ryan Lortie <desrt desrt ca>
Date:   Sat Dec 21 22:18:48 2013 -0500

    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(+), 0 deletions(-)
---
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index ff6c4c1..b415dd1 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 9a8bd41..dab1602 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]