giscanner/ast.py \
giscanner/cachestore.py \
giscanner/codegen.py \
- giscanner/config.py \
giscanner/dumper.py \
giscanner/introspectablepass.py \
giscanner/girparser.py \
bin_SCRIPTS += g-ir-scanner g-ir-annotation-tool
EXTRA_DIST += tools/g-ir-scanner.in tools/g-ir-annotation-tool.in
+TOOL_SUBSTITUTIONS = sed -e s,@libdir\@,$(libdir), -e s,@pkgdatadir\@,$(pkgdatadir), -e s,@PYTHON\@,$(PYTHON),
+
g-ir-scanner: tools/g-ir-scanner.in _giscanner.la Makefile
- $(AM_V_GEN) sed -e s,@libdir\@,$(libdir), -e s,@PYTHON\@,$(PYTHON), $< > $@.tmp && mv $@.tmp $@
+ $(AM_V_GEN) $(TOOL_SUBSTITUTIONS) $< > $@.tmp && mv $@.tmp $@
@chmod a+x $@
g-ir-annotation-tool: tools/g-ir-annotation-tool.in _giscanner.la Makefile
- $(AM_V_GEN) sed -e s,@libdir\@,$(libdir), -e s,@PYTHON\@,$(PYTHON), $< > $@.tmp && mv $@.tmp $@
+ $(AM_V_GEN) $(TOOL_SUBSTITUTIONS) $< > $@.tmp && mv $@.tmp $@
@chmod a+x $@
g_ir_compiler_SOURCES = tools/compiler.c
AC_CONFIG_FILES([
Makefile
-giscanner/config.py
m4/Makefile
tests/Makefile
tests/offsets/Makefile
+++ /dev/null
-# -*- Mode: Python -*-
-# GObject-Introspection - a framework for introspecting GObject libraries
-# Copyright (C) 2008 Johan Dahlin
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-
-DATADIR = "@datarootdir@"
-DATADIR = DATADIR.replace(
- "${prefix}", "@prefix@")
-GIR_DIR = "@GIR_DIR@"
-GIR_SUFFIX = "@GIR_SUFFIX@"
from .gdumpparser import IntrospectionBinary
from . import utils
-from .config import DATADIR
# bugzilla.gnome.org/558436
# Compile a binary program which is then linked to a library
from . import ast
from . import message
from .cachestore import CacheStore
-from .config import DATADIR, GIR_DIR, GIR_SUFFIX
from .girparser import GIRParser
from .sourcescanner import (
SourceSymbol, ctype_name, CTYPE_POINTER,
def _find_include(self, include):
searchdirs = self._includepaths[:]
for path in _xdg_data_dirs:
- searchdirs.append(os.path.join(path, GIR_SUFFIX))
- searchdirs.append(GIR_DIR)
+ searchdirs.append(os.path.join(path, 'gir-1.0'))
+ searchdirs.append(os.path.join(DATADIR, 'gir-1.0'))
girname = '%s-%s.gir' % (include.name, include.version)
for d in searchdirs:
import os
import sys
+import __builtin__
+
+__builtin__.__dict__['DATADIR'] = "@pkgdatadir@"
if 'GI_SCANNER_DEBUG' in os.environ:
def on_exception(exctype, value, tb):
import os
import sys
+import __builtin__
+
+__builtin__.__dict__['DATADIR'] = "@pkgdatadir@"
if 'GI_SCANNER_DEBUG' in os.environ:
def on_exception(exctype, value, tb):