summaryrefslogtreecommitdiff
path: root/giscanner/utils.py
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2013-11-13 12:31:19 +0100
committerCarlos Garcia Campos <carlosgc@gnome.org>2013-11-15 17:36:37 +0100
commit95cbe0c58f729fbcd27e68a693a8bbcaaf117858 (patch)
treee413da849fb17e8ce45b0cb9b570603466923461 /giscanner/utils.py
parent562258d22f983b135cfc5031cb023d6b07473150 (diff)
downloadgobject-introspection-95cbe0c58f729fbcd27e68a693a8bbcaaf117858.tar.gz
giscanner: Make sure we use real paths in more places
Ensure we are using the real path also for cflags comming from pkg_config files and command line options. This fixes the generation of the gir files when include paths contain symlinks. https://bugzilla.gnome.org/show_bug.cgi?id=712211
Diffstat (limited to 'giscanner/utils.py')
-rw-r--r--giscanner/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/giscanner/utils.py b/giscanner/utils.py
index 77d05b9e..def53fe4 100644
--- a/giscanner/utils.py
+++ b/giscanner/utils.py
@@ -148,3 +148,10 @@ def files_are_identical(path1, path2):
f1.close()
f2.close()
return buf1 == buf2
+
+
+def cflag_real_include_path(cflag):
+ if not cflag.startswith("-I"):
+ return cflag
+
+ return "-I" + os.path.realpath(cflag[2:])