diff options
author | Colin Walters <walters@verbum.org> | 2010-11-04 14:42:18 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-11-09 11:52:29 -0500 |
commit | 8f5d725524acf1cd1631e36de4de52efbee04ffa (patch) | |
tree | 088bd5d50a10fac42cfb53328c9e3d2e4569ae42 /tools/g-ir-scanner.in | |
parent | 8916db0a3831cb5e6c3b714125f7596f43d6aa6a (diff) | |
download | gobject-introspection-8f5d725524acf1cd1631e36de4de52efbee04ffa.tar.gz |
tools: Switch to checking UNINSTALLED_INTROSPECTION_SRCDIR
Rather than introspecting the current directory, use the environment
variable we know is present if and only if we're running uninstalled.
This will be less prone to failure when we switch to nonrecursive
make, since the generated script will be in the top builddir, not
tools/ anymore.
Diffstat (limited to 'tools/g-ir-scanner.in')
-rwxr-xr-x | tools/g-ir-scanner.in | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/g-ir-scanner.in b/tools/g-ir-scanner.in index 943d9baa..86866c93 100755 --- a/tools/g-ir-scanner.in +++ b/tools/g-ir-scanner.in @@ -29,11 +29,9 @@ if 'GI_SCANNER_DEBUG' in os.environ: pdb.pm() sys.excepthook = on_exception -# This only works on unix systems -currentdir = os.path.dirname(os.path.abspath(sys.argv[0])) -current_name = os.path.basename(currentdir) -if current_name == 'tools': - path = os.path.abspath(os.path.join(currentdir, '..')) +srcdir=os.getenv('UNINSTALLED_INTROSPECTION_SRCDIR', None) +if srcdir is not None: + path = srcdir else: # This is a private directory, we don't want to pollute the global # namespace. |