summaryrefslogtreecommitdiff
path: root/girepository
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-06-01 09:18:43 +0200
committerColin Walters <walters@verbum.org>2009-06-11 13:53:01 -0400
commitdb214ed923cfe9fc75432d5338e8a3b0d9c83d25 (patch)
treebc4afafbeacf2d7584bcf7bd326ad88d58991cfd /girepository
parent31317a9ffa31af959dd51eedfa2f31f586687475 (diff)
downloadgobject-introspection-db214ed923cfe9fc75432d5338e8a3b0d9c83d25.tar.gz
Make g-ir-compiler find files installed by make install
When ./configure --prefix $HOME/some/where is used gobject-introspection will happily install the files into $HOME/some/where/data/gir-1.0 but it will refuse to find them. Apply the same trick as in girepository/girepository.c:init_globals to find the gir files. Unifiy the name gir-1.0 in GIR_SUFFIX and use it throughout the project, introduce GIR_DIR which holds the path to the gir files and update girparser and transformer.py to look into this path.
Diffstat (limited to 'girepository')
-rw-r--r--girepository/girparser.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/girepository/girparser.c b/girepository/girparser.c
index 2e8890ea..0a06aa08 100644
--- a/girepository/girparser.c
+++ b/girepository/girparser.c
@@ -27,6 +27,7 @@
#include "girmodule.h"
#include "girnode.h"
#include "gtypelib.h"
+#include "config.h"
struct _GIrParser
{
@@ -245,13 +246,18 @@ locate_gir (GIrParser *parser,
}
for (dir = datadirs; *dir; dir++)
{
- path = g_build_filename (*dir, "gir-1.0", girname, NULL);
+ path = g_build_filename (*dir, GIR_SUFFIX, girname, NULL);
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
return path;
g_free (path);
path = NULL;
}
- return path;
+
+ path = g_build_filename (GIR_DIR, girname, NULL);
+ if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
+ return path;
+ g_free (path);
+ return NULL;
}
#define MISSING_ATTRIBUTE(ctx,error,element,attribute) \