summaryrefslogtreecommitdiff
path: root/giscanner/scannermain.py
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2013-11-16 14:18:34 +0100
committerColin Walters <walters@verbum.org>2013-11-16 10:17:23 -0500
commitb45d3949422faeae297cfd4dd28a9a08df68f3b4 (patch)
tree69526a29229d9e69f4da92b8766ca69cf954cf3b /giscanner/scannermain.py
parent95cbe0c58f729fbcd27e68a693a8bbcaaf117858 (diff)
downloadgobject-introspection-b45d3949422faeae297cfd4dd28a9a08df68f3b4.tar.gz
giscanner: Handle the case when there's a space between -I cpp flag and the path
In this case we were considering -I and the path as two different command line options. This was not a problem in the past (or for other cpp flags) because they are passed directly to gcc that accepts it. Now that we are ensuring that the include paths are always real paths, we need to handle this case to identify include paths in the command line. https://bugzilla.gnome.org/show_bug.cgi?id=712211
Diffstat (limited to 'giscanner/scannermain.py')
-rwxr-xr-xgiscanner/scannermain.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index bc7bc16f..715084d4 100755
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -47,6 +47,9 @@ def process_cflags_begin(option, opt, value, parser):
cflags = getattr(parser.values, option.dest)
while len(parser.rargs) > 0 and parser.rargs[0] != '--cflags-end':
arg = parser.rargs.pop(0)
+ if arg == "-I" and parser.rargs and parser.rargs[0] != '--cflags-end':
+ # This is a special case where there's a space between -I and the path.
+ arg += parser.rargs.pop(0)
cflags.append(utils.cflag_real_include_path(arg))