If a filename of an existing file is passed to --library, hunt for it
authorOwen Taylor <otaylor@redhat.com>
Wed, 29 Oct 2008 20:36:51 +0000 (20:36 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Wed, 29 Oct 2008 20:36:51 +0000 (20:36 +0000)
2008-10-29  Owen Taylor  <otaylor@redhat.com>

        * giscanner/glibtransformer.py: If a filename of an existing
file is passed to --library, hunt for it directly, rather than
searching for a corresponding library.

svn path=/trunk/; revision=832

ChangeLog
giscanner/glibtransformer.py

index 8dfbe43..cd63911 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-29  Owen Taylor  <otaylor@redhat.com>
+
+       * giscanner/glibtransformer.py: If a filename of an existing
+       file is passed to --library, hunt for it directly, rather than
+       searching for a corresponding library.
+
 2008-10-29  Johan Dahlin  <jdahlin@async.com.br>
 
        * giscanner/libtoolimporter.py:
index e80b66c..2c94f90 100644 (file)
@@ -80,7 +80,9 @@ class GLibTransformer(object):
     def add_library(self, libname):
         # For testing mainly.
         libtool_libname = 'lib' + libname + '.la'
-        if os.path.exists(libtool_libname):
+        if os.path.exists(libname):
+            found_libname = os.path.abspath(libname)
+        elif os.path.exists(libtool_libname):
             found_libname = extract_libtool(libtool_libname)
         elif libname.endswith('.la'):
             found_libname = extract_libtool(libname)