diff options
author | Tommi Komulainen <tko@src.gnome.org> | 2008-11-25 17:54:41 +0000 |
---|---|---|
committer | Tommi Komulainen <tko@src.gnome.org> | 2008-11-25 17:54:41 +0000 |
commit | 36e79c013bd81f9b8b948b8c453c8747cd3ead92 (patch) | |
tree | 1b0794f4c774eb80cad5daeb0bbdb073767a7aff | |
parent | 5797804466230a27dcfef0635ee2bc3fba7b0c71 (diff) | |
download | gobject-introspection-36e79c013bd81f9b8b948b8c453c8747cd3ead92.tar.gz |
fix link failure when introspecting girepository itself
* giscanner/dumper.py (_link): fix link failure when
introspecting girepository itself by ordering the command line
options better
svn path=/trunk/; revision=966
-rw-r--r-- | giscanner/dumper.py | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/giscanner/dumper.py b/giscanner/dumper.py index a6945789..3511a7f9 100644 --- a/giscanner/dumper.py +++ b/giscanner/dumper.py @@ -171,10 +171,21 @@ class DumpCompiler(object): # Search the current directory first args.append('-L.') - # We only use the first library; assume others are "custom" libraries - # like from gir-repository. Right now those don't define new GTypes, - # so we don't need to introspect them. - args.append('-l' + self._options.libraries[0]) + uninst_builddir = os.environ.get('UNINSTALLED_INTROSPECTION_BUILDDIR') + # hack for building GIRepository.gir, skip -lgirepository since + # libgirepository.la is not in current directory and we refer to it + # explicitly below anyway + if not uninst_builddir or self._options.libraries[0] != 'girepository': + # We only use the first library; assume others are "custom" + # libraries like from gir-repository. Right now those don't define + # new GTypes, so we don't need to introspect them. + args.append('-l' + self._options.libraries[0]) + + # hack for building gobject-introspection itself + if uninst_builddir: + path = os.path.join(uninst_builddir, 'girepository', + 'libgirepository.la') + args.append(path) args.extend(self._run_pkgconfig('--libs')) for source in sources: @@ -183,13 +194,6 @@ class DumpCompiler(object): "Could not find object file: %s" % (source, )) args.extend(list(sources)) - uninst_builddir = os.environ.get('UNINSTALLED_INTROSPECTION_BUILDDIR') - # This hack is only for building gobject-introspection itself - if uninst_builddir: - path = os.path.join(uninst_builddir, 'girepository', - 'libgirepository.la') - args.append(path) - subprocess.check_call(args) |