py-compile
omf.make
xmldocs.make
-examples/glib-print
+glib-print
+scannerlexer.c
+scannerparser.[ch]
docs/reference/gi-decl-list.txt
docs/reference/gi-decl.txt
docs/reference/gi-undeclared.txt
docs/reference/xml
docs/reference/tmpl
docs/reference/*.bak
-gir/DBus-1.0.typelib
-gir/DBusGLib-1.0.typelib
-gir/Everything-1.0.gir
-gir/Everything-1.0.typelib
-gir/GIMarshallingTests-1.0.gir
-gir/GIMarshallingTests-1.0.typelib
-gir/GIRepository-2.0.gir
-gir/GIRepository-2.0.typelib
-gir/GL-1.0.typelib
-gir/GLib-2.0.gir
-gir/GLib-2.0.typelib
-gir/GModule-2.0.gir
-gir/GModule-2.0.typelib
-gir/GObject-2.0.gir
-gir/GObject-2.0.typelib
-gir/Gio-2.0.gir
-gir/Gio-2.0.typelib
-gir/cairo-1.0.typelib
-gir/fontconfig-2.0.typelib
-gir/freetype2-2.0.typelib
-gir/libxml2-2.0.typelib
-gir/xfixes-4.0.typelib
-gir/xft-2.0.typelib
-gir/xlib-2.0.typelib
-gir/xrandr-1.3.typelib
+DBus-1.0.typelib
+DBusGLib-1.0.typelib
+Everything-1.0.gir
+Everything-1.0.typelib
+GIMarshallingTests-1.0.gir
+GIMarshallingTests-1.0.typelib
+GIRepository-2.0.gir
+GIRepository-2.0.typelib
+GL-1.0.typelib
+GLib-2.0.gir
+GLib-2.0.typelib
+GModule-2.0.gir
+GModule-2.0.typelib
+GObject-2.0.gir
+GObject-2.0.typelib
+Gio-2.0.gir
+Gio-2.0.typelib
+cairo-1.0.typelib
+fontconfig-2.0.typelib
+freetype2-2.0.typelib
+libxml2-2.0.typelib
+xfixes-4.0.typelib
+xft-2.0.typelib
+xlib-2.0.typelib
+xrandr-1.3.typelib
giscanner/config.py
giscanner/scannerlexer.c
giscanner/scannerparser.c
tests/scanner/Utility-1.0.gir
tests/scanner/Utility-1.0.typelib
tests/extended.gir.test
-tools/g-ir-compiler
-tools/g-ir-generate
-tools/g-ir-scanner
-tools/g-ir-annotation-tool
-tools/g-ir-docgen
+g-ir-compiler
+g-ir-generate
+g-ir-scanner
+g-ir-annotation-tool
+g-ir-docgen
--- /dev/null
+noinst_PROGRAMS += glib-print
+
+glib_print_SOURCES = examples/glib-print.c
+glib_print_CFLAGS = $(GOBJECT_CFLAGS) -I$(top_srcdir)/girepository
+glib_print_LDADD = libgirepository-1.0.la $(GOBJECT_LIBS)
--- /dev/null
+BUILT_GIRSOURCES =
+
+STATIC_GIRSOURCES = \
+ gir/cairo-1.0.gir \
+ gir/DBus-1.0.gir \
+ gir/DBusGLib-1.0.gir \
+ gir/fontconfig-2.0.gir \
+ gir/freetype2-2.0.gir \
+ gir/GL-1.0.gir \
+ gir/libxml2-2.0.gir \
+ gir/xft-2.0.gir \
+ gir/xlib-2.0.gir \
+ gir/xfixes-4.0.gir \
+ gir/xrandr-1.3.gir
+EXTRA_DIST += $(STATIC_GIRSOURCES)
+
+# glib with source (to enable documentation)
+if WITH_GLIBSRC
+ GLib_2_0_gir_DOCSRC = $(GLIBSRC)/glib/*.c
+ GObject_2_0_gir_DOCSRC = $(GLIBSRC)/gobject/*.c
+ GModule_2_0_gir_DOCSRC = $(GLIBSRC)/gmodule/*.c
+ Gio_2_0_gir_DOCSRC = $(GLIBSRC)/gio/*.c
+else
+ GLib_2_0_gir_DOCSRC =
+ GObject_2_0_gir_DOCSRC =
+ GModule_2_0_gir_DOCSRC =
+ Gio_2_0_gir_DOCSRC =
+
+endif
+
+# glib
+GLIB_INCLUDEDIR=$(shell pkg-config --variable=includedir glib-2.0)/glib-2.0
+GLIB_LIBDIR=$(shell pkg-config --variable=libdir glib-2.0)
+
+if OS_WIN32
+GLIB_LIBRARY=libglib-2.0-0
+else
+GLIB_LIBRARY=glib-2.0
+endif
+
+GLib_2_0_gir_LIBS = $(GLIB_LIBRARY)
+GLib_2_0_gir_SCANNERFLAGS = \
+ --reparse-validate \
+ --identifier-prefix=G \
+ --symbol-prefix=g \
+ --symbol-prefix=glib \
+ --c-include="glib.h" \
+ $(GLib_2_0_gir_DOCSRC)
+GLib_2_0_gir_PACKAGES = glib-2.0
+GLib_2_0_gir_CFLAGS = \
+ -I$(GLIB_INCLUDEDIR) \
+ -I$(GLIB_LIBDIR)/glib-2.0/include \
+ -DGETTEXT_PACKAGE=Dummy \
+ -DGLIB_COMPILATION \
+ -D__G_I18N_LIB_H__
+GLib_2_0_gir_FILES = \
+ $(GLIB_LIBDIR)/glib-2.0/include/glibconfig.h \
+ $(GLIB_INCLUDEDIR)/glib/*.h \
+ gir/glib-2.0.c
+
+BUILT_GIRSOURCES += GLib-2.0.gir
+
+GLib-2.0.gir: g-ir-scanner
+
+DBusGLib-1.0.typelib: GObject-2.0.gir
+
+# gobject
+GOBJECT_INCLUDEDIR=$(shell pkg-config --variable=includedir gobject-2.0)/glib-2.0
+GOBJECT_LIBDIR=$(shell pkg-config --variable=libdir gobject-2.0)
+
+if OS_WIN32
+GOBJECT_LIBRARY=libgobject-2.0-0
+else
+GOBJECT_LIBRARY=gobject-2.0
+endif
+
+GObject-2.0.gir: GLib-2.0.gir
+
+GObject_2_0_gir_LIBS = $(GOBJECT_LIBRARY)
+GObject_2_0_gir_SCANNERFLAGS = \
+ --reparse-validate \
+ --identifier-prefix=G \
+ --c-include="glib-object.h" \
+ --add-include-path=. \
+ $(GObject_2_0_gir_DOCSRC)
+
+GObject_2_0_gir_PACKAGES = gobject-2.0
+GObject_2_0_gir_INCLUDES = GLib-2.0
+GObject_2_0_gir_CFLAGS = \
+ -DGOBJECT_COMPILATION \
+ -I$(GOBJECT_INCLUDEDIR) \
+ -I$(GOBJECT_LIBDIR)/glib-2.0/include
+GObject_2_0_gir_FILES = $(GLIB_INCLUDEDIR)/gobject/*.h gir/gobject-2.0.c
+
+BUILT_GIRSOURCES += GObject-2.0.gir
+
+# gmodule
+GMODULE_INCLUDEDIR=$(shell pkg-config --variable=includedir gmodule-2.0)/glib-2.0
+GMODULE_LIBDIR=$(shell pkg-config --variable=libdir gmodule-2.0)
+
+if OS_WIN32
+GMODULE_LIBRARY=libgmodule-2.0-0
+else
+GMODULE_LIBRARY=gmodule-2.0
+endif
+
+GModule-2.0.gir: GLib-2.0.gir
+
+GModule_2_0_gir_LIBS = $(GMODULE_LIBRARY)
+GModule_2_0_gir_SCANNERFLAGS = \
+ --identifier-prefix=G \
+ --c-include="gmodule.h" \
+ --add-include-path=. \
+ $(GModule_2_0_gir_DOCSRC)
+
+GModule_2_0_gir_PACKAGES = gmodule-2.0
+GModule_2_0_gir_INCLUDES = GLib-2.0
+GModule_2_0_gir_CFLAGS = \
+ -I$(GMODULE_INCLUDEDIR) \
+ -I$(GMODULE_LIBDIR)/glib-2.0/include
+GModule_2_0_gir_FILES = $(GLIB_INCLUDEDIR)/gmodule.h
+
+BUILT_GIRSOURCES += GModule-2.0.gir
+
+# gio
+GIO_INCLUDEDIR=$(shell pkg-config --variable=includedir gio-2.0)/glib-2.0
+GIO_LIBDIR=$(shell pkg-config --variable=libdir gio-2.0)
+
+if OS_WIN32
+GIO_LIBRARY=libgio-2.0-0
+else
+GIO_LIBRARY=gio-2.0
+endif
+
+if HAVE_GIO_UNIX
+GIO_UNIX_HDRS=$(shell pkg-config --variable=includedir gio-unix-2.0)/gio-unix-2.0/gio/*.h
+GIO_UNIX_PACKAGES = gio-unix-2.0
+else
+GIO_UNIX_HDRS=
+GIO_UNIX_PACKAGES =
+endif
+
+Gio-2.0.gir: GObject-2.0.gir
+
+Gio_2_0_gir_LIBS = $(GIO_LIBRARY)
+Gio_2_0_gir_SCANNERFLAGS = \
+ --reparse-validate \
+ --warn-all \
+ --identifier-prefix=G \
+ --c-include="gio/gio.h" \
+ --add-include-path=. \
+ $(Gio_2_0_gir_DOCSRC)
+
+Gio_2_0_gir_PACKAGES = gio-2.0 $(GIO_UNIX_PACKAGES)
+Gio_2_0_gir_INCLUDES = GObject-2.0
+Gio_2_0_gir_CFLAGS = \
+ -DGIO_COMPILATION \
+ -I$(GIO_LIBDIR)/glib-2.0/include
+Gio_2_0_gir_FILES = \
+ $(GIO_UNIX_HDRS) \
+ $(GIO_INCLUDEDIR)/gio/*.h \
+ gir/gio-2.0.c
+
+BUILT_GIRSOURCES += Gio-2.0.gir
+EXTRA_DIST += gir/glib-2.0.c gir/gobject-2.0.c gir/gio-2.0.c
+
+# girepository
+GIRepository-2.0.gir: GObject-2.0.gir libgirepository-1.0.la
+
+GIRepository_2_0_gir_LIBS = libgirepository-1.0.la
+GIRepository_2_0_gir_SCANNERFLAGS = \
+ --warn-all \
+ --identifier-prefix=GI \
+ --symbol-prefix=g \
+ --c-include="girepository.h" \
+ --add-include-path=.
+GIRepository_2_0_gir_PACKAGES = gobject-2.0
+GIRepository_2_0_gir_INCLUDES = GObject-2.0
+GIRepository_2_0_gir_EXPORT_PACKAGES = gobject-introspection-1.0
+GIRepository_2_0_gir_CFLAGS = \
+ -I$(top_srcdir)/girepository -I$(top_srcdir) \
+ -DGI_COMPILATION
+GIRepository_2_0_gir_FILES = \
+ $(top_srcdir)/girepository/girepository.h \
+ $(top_srcdir)/girepository/girepository.c \
+ $(top_srcdir)/girepository/gi*info.c \
+ $(top_srcdir)/girepository/gi*info.h \
+ $(top_srcdir)/girepository/gitypelib.h \
+ $(top_srcdir)/girepository/gitypes.h
+
+BUILT_GIRSOURCES += GIRepository-2.0.gir
+
+CLEANFILES += $(BUILT_GIRSOURCES)
+
+INTROSPECTION_GIRS += $(BUILT_GIRSOURCES)
+
+girdir = $(GIR_DIR)
+gir_DATA = $(STATIC_GIRSOURCES) $(BUILT_GIRSOURCES)
+
+typelibsdir = $(libdir)/girepository-1.0
+typelibs_DATA = $(GIRSOURCES:.gir=.typelib)
+
+CLEANFILES += $(typelibs_DATA)
--- /dev/null
+girepodir = $(includedir)/gobject-introspection-1.0/
+girepo_HEADERS = \
+ girepository/giarginfo.h \
+ girepository/gibaseinfo.h \
+ girepository/gicallableinfo.h \
+ girepository/giconstantinfo.h \
+ girepository/gienuminfo.h \
+ girepository/gierrordomaininfo.h \
+ girepository/gifieldinfo.h \
+ girepository/gifunctioninfo.h \
+ girepository/giinterfaceinfo.h \
+ girepository/giobjectinfo.h \
+ girepository/gipropertyinfo.h \
+ girepository/giregisteredtypeinfo.h \
+ girepository/girepository.h \
+ girepository/girffi.h \
+ girepository/gisignalinfo.h \
+ girepository/gistructinfo.h \
+ girepository/gitypeinfo.h \
+ girepository/gitypelib.h \
+ girepository/gitypes.h \
+ girepository/giunioninfo.h \
+ girepository/givfuncinfo.h
+
+lib_LTLIBRARIES += libgirepository-1.0.la
+noinst_LTLIBRARIES += libgirepository-parser.la
+
+libgirepository_1_0_la_SOURCES = \
+ girepository/gdump.c \
+ girepository/giarginfo.c \
+ girepository/gibaseinfo.c \
+ girepository/gicallableinfo.c \
+ girepository/giconstantinfo.c \
+ girepository/gienuminfo.c \
+ girepository/gierrordomaininfo.c \
+ girepository/gifieldinfo.c \
+ girepository/gifunctioninfo.c \
+ girepository/ginvoke.c \
+ girepository/giinterfaceinfo.c \
+ girepository/giobjectinfo.c \
+ girepository/gipropertyinfo.c \
+ girepository/giregisteredtypeinfo.c \
+ girepository/girepository.c \
+ girepository/girepository-private.h \
+ girepository/girffi.c \
+ girepository/girffi.h \
+ girepository/gisignalinfo.c \
+ girepository/gistructinfo.c \
+ girepository/gitypeinfo.c \
+ girepository/gitypelib.c \
+ girepository/gitypelib-internal.h \
+ girepository/glib-compat.h \
+ girepository/giunioninfo.c \
+ girepository/givfuncinfo.c
+
+libgirepository_1_0_la_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository -DG_IREPOSITORY_COMPILATION
+libgirepository_1_0_la_LIBADD = $(GIREPO_LIBS)
+libgirepository_1_0_la_LDFLAGS = -no-undefined -version-number 1:0:0
+
+libgirepository_parser_la_SOURCES = \
+ girepository/girmodule.c \
+ girepository/girmodule.h \
+ girepository/girnode.c \
+ girepository/girnode.h \
+ girepository/giroffsets.c \
+ girepository/girparser.c \
+ girepository/girparser.h \
+ girepository/girwriter.c \
+ girepository/girwriter.h
+libgirepository_parser_la_CFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
+
+gdumpdir = $(datadir)/gobject-introspection-1.0/
+gdump_DATA = girepository/gdump.c
--- /dev/null
+## Process this file with automake to produce Makefile.in
+
+BUILT_SOURCES += \
+ scannerparser.c \
+ scannerparser.h \
+ scannerlexer.c \
+ scannerlexer.h
+
+AM_YFLAGS = -d -t
+
+# Why do I have to do this automake?
+scannerlexer.h: giscanner/scannerlexer.c
+
+noinst_LTLIBRARIES += libgiscanner.la
+
+libgiscanner_la_SOURCES = \
+ giscanner/sourcescanner.c \
+ giscanner/sourcescanner.h \
+ giscanner/scannerlexer.l \
+ giscanner/scannerparser.y \
+ giscanner/grealpath.h
+libgiscanner_la_CPPFLAGS = -I$(top_srcdir)/girepository -I$(top_srcdir)/giscanner
+libgiscanner_la_LIBADD = $(GOBJECT_LIBS)
+libgiscanner_la_CFLAGS = $(GOBJECT_CFLAGS)
+
+# Python module
+pkgpyexecdir = $(pkglibdir)/giscanner
+pkgpyexec_LTLIBRARIES = _giscanner.la
+pkgpyexec_PYTHON = \
+ giscanner/__init__.py \
+ giscanner/annotationmain.py \
+ giscanner/annotationparser.py \
+ giscanner/ast.py \
+ giscanner/cachestore.py \
+ giscanner/codegen.py \
+ giscanner/config.py \
+ giscanner/dumper.py \
+ giscanner/introspectablepass.py \
+ giscanner/girparser.py \
+ giscanner/girwriter.py \
+ giscanner/gdumpparser.py \
+ giscanner/libtoolimporter.py \
+ giscanner/odict.py \
+ giscanner/maintransformer.py \
+ giscanner/message.py \
+ giscanner/shlibs.py \
+ giscanner/scannermain.py \
+ giscanner/sourcescanner.py \
+ giscanner/testcodegen.py \
+ giscanner/transformer.py \
+ giscanner/utils.py \
+ giscanner/xmlwriter.py
+
+_giscanner_la_CFLAGS = \
+ $(PYTHON_INCLUDES) \
+ $(GOBJECT_CFLAGS) \
+ -I$(top_srcdir)/giscanner
+_giscanner_la_LIBADD = libgiscanner.la $(GOBJECT_LIBS)
+
+_giscanner_la_LDFLAGS = \
+ -module -avoid-version -export-symbols-regex init_giscanner
+
+if OS_WIN32
+# Yuck. Probably there is a way to get this from Python, but I don't
+# know how. Use -Wl to avoid libtool crack.
+_giscanner_la_LDFLAGS += -Wl,$(pyexecdir)/../../libs/libpython25.a -no-undefined
+endif
+
+_giscanner_la_SOURCES = giscanner/giscannermodule.c
+
+if OS_WIN32
+BUILT_SOURCES += _giscanner.pyd
+CLEANFILES += _giscanner.pyd
+
+_giscanner.pyd: _giscanner.la
+ cp .libs/_giscanner.dll $@
+
+install-exec-hook:
+ mv $(pkgpyexecdir)/_giscanner.dll $(pkgpyexecdir)/_giscanner.pyd
+ rm $(pkgpyexecdir)/_giscanner.dll.a
+ rm $(pkgpyexecdir)/_giscanner.la
+endif
--- /dev/null
+bin_PROGRAMS += g-ir-compiler g-ir-generate
+bin_SCRIPTS += g-ir-scanner g-ir-annotation-tool
+EXTRA_DIST += tools/g-ir-scanner.in tools/g-ir-annotation-tool.in
+
+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 $@
+ @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 $@
+ @chmod a+x $@
+
+g_ir_compiler_SOURCES = tools/compiler.c
+g_ir_compiler_CPPFLAGS = -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\"" \
+ -I$(top_srcdir)/girepository
+g_ir_compiler_CFLAGS = $(GIREPO_CFLAGS)
+g_ir_compiler_LDADD = \
+ libgirepository-parser.la \
+ libgirepository-1.0.la
+
+g_ir_generate_SOURCES = tools/generate.c
+g_ir_generate_CPPFLAGS = -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\"" \
+ -I$(top_srcdir)/girepository
+g_ir_generate_CFLAGS = $(GIREPO_CFLAGS)
+g_ir_generate_LDADD = \
+ libgirepository-parser.la \
+ libgirepository-1.0.la
+
+GCOVSOURCES = \
+ $(g_ir_compiler_SOURCES) \
+ $(g_ir_generate_SOURCES)
+
+CLEANFILES += g-ir-scanner g-ir-annotation-tool
+man_MANS =
+EXTRA_DIST =
+lib_LTLIBRARIES =
+noinst_LTLIBRARIES =
+BUILT_SOURCES =
+CLEANFILES = $(BUILT_SOURCES)
+INTROSPECTION_GIRS =
+check_LTLIBRARIES =
+check_PROGRAMS =
+bin_PROGRAMS =
+bin_SCRIPTS =
+noinst_PROGRAMS =
+
+include common.mk
+include Makefile.introspection
+
+include Makefile-girepository.am
+include Makefile-giscanner.am
+include Makefile-examples.am
+include Makefile-gir.am
+include Makefile-tools.am
+
## Process this file with automake to produce Makefile.in
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = girepository giscanner tools gir docs tests examples
+SUBDIRS = . docs tests
+
DIST_SUBDIRS = m4 $(SUBDIRS)
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
-man_MANS = \
+man_MANS += \
docs/g-ir-compiler.1 \
docs/g-ir-generate.1 \
docs/g-ir-scanner.1
makedir = $(datadir)/gobject-introspection-1.0
dist_make_DATA = Makefile.introspection
-EXTRA_DIST = \
+EXTRA_DIST += \
COPYING.LGPL \
COPYING.GPL \
CONTRIBUTORS \
PYTHONPATH=$(top_builddir):$(top_srcdir) \
UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
- $(top_builddir)/tools/g-ir-scanner$(EXEEXT)
+ $(top_builddir)/g-ir-scanner$(EXEEXT)
INTROSPECTION_SCANNER_ARGS = \
--verbose \
-I$(top_srcdir) \
--add-include-path=$(builddir) \
--add-include-path=$(top_builddir)/gir
-INTROSPECTION_COMPILER = $(top_builddir)/tools/g-ir-compiler$(EXEEXT)
+INTROSPECTION_COMPILER = $(top_builddir)/g-ir-compiler$(EXEEXT)
INTROSPECTION_COMPILER_ARGS = \
--includedir=$(srcdir) \
--includedir=$(top_srcdir)/gir \
AC_SUBST(GIR_DIR)
AC_DEFINE_UNQUOTED(GIR_DIR, "$GIR_DIR", [Director prefix for gir installation])
-PKG_CHECK_MODULES(GOBJECT, [gobject-2.0 gio-2.0])
-PKG_CHECK_MODULES(GTHREAD, [gthread-2.0])
+PKG_CHECK_MODULES(GLIB, [glib-2.0])
+PKG_CHECK_MODULES(GOBJECT, [gobject-2.0])
+PKG_CHECK_MODULES(GIO, [gio-2.0])
PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0], have_gio_unix=true, have_gio_unix=false)
AM_CONDITIONAL(HAVE_GIO_UNIX, test x$have_gio_unix = xtrue)
AC_CONFIG_FILES([
Makefile
-gir/Makefile
-girepository/Makefile
-giscanner/Makefile
giscanner/config.py
m4/Makefile
-tools/Makefile
tests/Makefile
tests/offsets/Makefile
tests/scanner/Makefile
tests/repository/Makefile
tests/warn/Makefile
-examples/Makefile
docs/Makefile
docs/reference/Makefile
gobject-introspection-1.0.pc
girmodule.h
INCLUDES=$(GIREPO_CFLAGS) -I$(top_srcdir)
-GTKDOC_LIBS = $(GIREPO_LIBS) $(top_builddir)/girepository/libgirepository-1.0.la $(top_builddir)/girepository/libgirepository-parser.la
+GTKDOC_LIBS = $(GIREPO_LIBS) $(top_builddir)/libgirepository-1.0.la $(top_builddir)/libgirepository-parser.la
content_files = \
gi-gir-reference.xml \
+++ /dev/null
-noinst_PROGRAMS = glib-print
-
-glib_print_SOURCES = glib-print.c
-glib_print_CFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
-glib_print_LDADD = $(top_builddir)/girepository/libgirepository-1.0.la $(GIREPO_LIBS)
+++ /dev/null
-include $(top_srcdir)/common.mk
-include $(top_srcdir)/Makefile.introspection
-
-EXPECTEDGIRS =
-BUILT_GIRSOURCES =
-CLEANFILES =
-EXTRA_DIST =
-
-BASE_GIRSOURCES = \
- cairo-1.0.gir \
- DBus-1.0.gir \
- DBusGLib-1.0.gir \
- fontconfig-2.0.gir \
- freetype2-2.0.gir \
- GL-1.0.gir \
- libxml2-2.0.gir \
- xft-2.0.gir \
- xlib-2.0.gir \
- xfixes-4.0.gir \
- xrandr-1.3.gir
-EXTRA_DIST += $(BASE_GIRSOURCES)
-
-INTROSPECTION_GIRS =
-
-# glib with source (to enable documentation)
-if WITH_GLIBSRC
- GLib_2_0_gir_DOCSRC = $(GLIBSRC)/glib/*.c
- GObject_2_0_gir_DOCSRC = $(GLIBSRC)/gobject/*.c
- GModule_2_0_gir_DOCSRC = $(GLIBSRC)/gmodule/*.c
- Gio_2_0_gir_DOCSRC = $(GLIBSRC)/gio/*.c
-else
- GLib_2_0_gir_DOCSRC =
- GObject_2_0_gir_DOCSRC =
- GModule_2_0_gir_DOCSRC =
- Gio_2_0_gir_DOCSRC =
-
-endif
-
-# glib
-GLIB_INCLUDEDIR=$(shell pkg-config --variable=includedir glib-2.0)/glib-2.0
-GLIB_LIBDIR=$(shell pkg-config --variable=libdir glib-2.0)
-
-if OS_WIN32
-GLIB_LIBRARY=libglib-2.0-0
-else
-GLIB_LIBRARY=glib-2.0
-endif
-
-GLib_2_0_gir_LIBS = $(GLIB_LIBRARY)
-GLib_2_0_gir_SCANNERFLAGS = \
- --reparse-validate \
- --identifier-prefix=G \
- --symbol-prefix=g \
- --symbol-prefix=glib \
- --c-include="glib.h" \
- $(GLib_2_0_gir_DOCSRC)
-GLib_2_0_gir_PACKAGES = glib-2.0
-GLib_2_0_gir_CFLAGS = \
- -I$(GLIB_INCLUDEDIR) \
- -I$(GLIB_LIBDIR)/glib-2.0/include \
- -DGETTEXT_PACKAGE=Dummy \
- -DGLIB_COMPILATION \
- -D__G_I18N_LIB_H__
-GLib_2_0_gir_FILES = \
- $(GLIB_LIBDIR)/glib-2.0/include/glibconfig.h \
- $(GLIB_INCLUDEDIR)/glib/*.h \
- glib-2.0.c
-
-INTROSPECTION_GIRS += GLib-2.0.gir
-
-DBusGLib-1.0.typelib: GObject-2.0.gir
-
-# gobject
-GOBJECT_INCLUDEDIR=$(shell pkg-config --variable=includedir gobject-2.0)/glib-2.0
-GOBJECT_LIBDIR=$(shell pkg-config --variable=libdir gobject-2.0)
-
-if OS_WIN32
-GOBJECT_LIBRARY=libgobject-2.0-0
-else
-GOBJECT_LIBRARY=gobject-2.0
-endif
-
-GObject-2.0.gir: GLib-2.0.gir
-
-GObject_2_0_gir_LIBS = $(GOBJECT_LIBRARY)
-GObject_2_0_gir_SCANNERFLAGS = \
- --reparse-validate \
- --identifier-prefix=G \
- --c-include="glib-object.h" \
- --add-include-path=. \
- $(GObject_2_0_gir_DOCSRC)
-
-GObject_2_0_gir_PACKAGES = gobject-2.0
-GObject_2_0_gir_INCLUDES = GLib-2.0
-GObject_2_0_gir_CFLAGS = \
- -DGOBJECT_COMPILATION \
- -I$(GOBJECT_INCLUDEDIR) \
- -I$(GOBJECT_LIBDIR)/glib-2.0/include
-GObject_2_0_gir_FILES = $(GLIB_INCLUDEDIR)/gobject/*.h gobject-2.0.c
-
-INTROSPECTION_GIRS += GObject-2.0.gir
-
-# gmodule
-GMODULE_INCLUDEDIR=$(shell pkg-config --variable=includedir gmodule-2.0)/glib-2.0
-GMODULE_LIBDIR=$(shell pkg-config --variable=libdir gmodule-2.0)
-
-if OS_WIN32
-GMODULE_LIBRARY=libgmodule-2.0-0
-else
-GMODULE_LIBRARY=gmodule-2.0
-endif
-
-GModule-2.0.gir: GLib-2.0.gir
-
-GModule_2_0_gir_LIBS = $(GMODULE_LIBRARY)
-GModule_2_0_gir_SCANNERFLAGS = \
- --identifier-prefix=G \
- --c-include="gmodule.h" \
- --add-include-path=. \
- $(GModule_2_0_gir_DOCSRC)
-
-GModule_2_0_gir_PACKAGES = gmodule-2.0
-GModule_2_0_gir_INCLUDES = GLib-2.0
-GModule_2_0_gir_CFLAGS = \
- -I$(GMODULE_INCLUDEDIR) \
- -I$(GMODULE_LIBDIR)/glib-2.0/include
-GModule_2_0_gir_FILES = $(GLIB_INCLUDEDIR)/gmodule.h
-
-INTROSPECTION_GIRS += GModule-2.0.gir
-
-# gio
-GIO_INCLUDEDIR=$(shell pkg-config --variable=includedir gio-2.0)/glib-2.0
-GIO_LIBDIR=$(shell pkg-config --variable=libdir gio-2.0)
-
-if OS_WIN32
-GIO_LIBRARY=libgio-2.0-0
-else
-GIO_LIBRARY=gio-2.0
-endif
-
-if HAVE_GIO_UNIX
-GIO_UNIX_HDRS=$(shell pkg-config --variable=includedir gio-unix-2.0)/gio-unix-2.0/gio/*.h
-GIO_UNIX_PACKAGES = gio-unix-2.0
-else
-GIO_UNIX_HDRS=
-GIO_UNIX_PACKAGES =
-endif
-
-Gio-2.0.gir: GObject-2.0.gir
-
-Gio_2_0_gir_LIBS = $(GIO_LIBRARY)
-Gio_2_0_gir_SCANNERFLAGS = \
- --reparse-validate \
- --warn-all \
- --identifier-prefix=G \
- --c-include="gio/gio.h" \
- --add-include-path=. \
- $(Gio_2_0_gir_DOCSRC)
-
-Gio_2_0_gir_PACKAGES = gio-2.0 $(GIO_UNIX_PACKAGES)
-Gio_2_0_gir_INCLUDES = GObject-2.0
-Gio_2_0_gir_CFLAGS = \
- -DGIO_COMPILATION \
- -I$(GIO_LIBDIR)/glib-2.0/include
-Gio_2_0_gir_FILES = \
- $(GIO_UNIX_HDRS) \
- $(GIO_INCLUDEDIR)/gio/*.h \
- gio-2.0.c
-
-INTROSPECTION_GIRS += Gio-2.0.gir
-EXTRA_DIST += glib-2.0.c gobject-2.0.c gio-2.0.c
-
-# girepository
-GIRepository-2.0.gir: GObject-2.0.gir $(top_builddir)/girepository/libgirepository-1.0.la
-
-GIRepository_2_0_gir_LIBS = $(top_builddir)/girepository/libgirepository-1.0.la
-GIRepository_2_0_gir_SCANNERFLAGS = \
- --warn-all \
- --identifier-prefix=GI \
- --symbol-prefix=g \
- --c-include="girepository.h" \
- --add-include-path=.
-GIRepository_2_0_gir_PACKAGES = gobject-2.0
-GIRepository_2_0_gir_INCLUDES = GObject-2.0
-GIRepository_2_0_gir_EXPORT_PACKAGES = gobject-introspection-1.0
-GIRepository_2_0_gir_CFLAGS = \
- -I$(top_srcdir)/girepository -I$(top_srcdir) \
- -DGI_COMPILATION
-GIRepository_2_0_gir_FILES = \
- $(top_srcdir)/girepository/girepository.h \
- $(top_srcdir)/girepository/girepository.c \
- $(top_srcdir)/girepository/gi*info.c \
- $(top_srcdir)/girepository/gi*info.h \
- $(top_srcdir)/girepository/gitypelib.h \
- $(top_srcdir)/girepository/gitypes.h
-
-
-INTROSPECTION_GIRS += GIRepository-2.0.gir
-
-# Generic rules
-CLEANFILES += $(INTROSPECTION_GIRS)
-
-GIRSOURCES = \
- $(BASE_GIRSOURCES) \
- $(INTROSPECTION_GIRS)
-
-girdir = $(GIR_DIR)
-gir_DATA = $(GIRSOURCES)
-
-typelibsdir = $(libdir)/girepository-1.0
-typelibs_DATA = $(GIRSOURCES:.gir=.typelib)
-
-CLEANFILES += $(typelibs_DATA)
-
-%.gir.check: %.gir
- @diff -u -U 10 $(srcdir)/$*-expected.gir $*.gir && echo " TEST $*.gir"
-
-CHECKGIRS = $(EXPECTEDGIRS:-expected.gir=.gir.check)
-check-local: $(CHECKGIRS)
-
-# Check that typelib -> gir -> typelib transformation is lossless.
-# Comparing gir files is relatively fragile (whitespace, attribute default
-# values, etc.) but the typelibs should identical as long as the gir files are
-# semantically equivalent.
-
-%.test.gir: %.typelib $(top_builddir)/tools/g-ir-generate$(EXEEXT)
- $(DEBUG) $(top_builddir)/tools/g-ir-generate$(EXEEXT) --includedir=. $< -o $@
-
-testlib-%: %.test.gir $(top_builddir)/tools/g-ir-generate$(EXEEXT)
- $(DEBUG) $(top_builddir)/tools/g-ir-compiler$(EXEEXT) --includedir=. $< -o $*.test.typelib
- cmp $*.typelib $*.test.typelib && rm $*.test.typelib
-
-testgir-%: %.test.gir
- diff -u $*.gir $< && rm $<
-
-CLEANFILES += $(typelibs_DATA:%.typelib=%.test.gir)
-CLEANFILES += $(typelibs_DATA:%.typelib=%.test.typelib)
-
-#check-local: $(typelibs_DATA:%.typelib=testlib-%)
-check-gir: $(typelibs_DATA:%.typelib=testgir-%)
-
-EXTRA_DIST += $(EXPECTEDGIRS)
+++ /dev/null
-girepodir = $(includedir)/gobject-introspection-1.0/
-girepo_HEADERS = \
- giarginfo.h \
- gibaseinfo.h \
- gicallableinfo.h \
- giconstantinfo.h \
- gienuminfo.h \
- gierrordomaininfo.h \
- gifieldinfo.h \
- gifunctioninfo.h \
- giinterfaceinfo.h \
- giobjectinfo.h \
- gipropertyinfo.h \
- giregisteredtypeinfo.h \
- girepository.h \
- girffi.h \
- gisignalinfo.h \
- gistructinfo.h \
- gitypeinfo.h \
- gitypelib.h \
- gitypes.h \
- giunioninfo.h \
- givfuncinfo.h
-
-lib_LTLIBRARIES = libgirepository-1.0.la
-noinst_LTLIBRARIES = libgirepository-parser.la
-
-libgirepository_1_0_la_SOURCES = \
- gdump.c \
- giarginfo.c \
- gibaseinfo.c \
- gicallableinfo.c \
- giconstantinfo.c \
- gienuminfo.c \
- gierrordomaininfo.c \
- gifieldinfo.c \
- gifunctioninfo.c \
- ginvoke.c \
- giinterfaceinfo.c \
- giobjectinfo.c \
- gipropertyinfo.c \
- giregisteredtypeinfo.c \
- girepository.c \
- girepository-private.h \
- girffi.c \
- girffi.h \
- gisignalinfo.c \
- gistructinfo.c \
- gitypeinfo.c \
- gitypelib.c \
- gitypelib-internal.h \
- glib-compat.h \
- giunioninfo.c \
- givfuncinfo.c
-
-libgirepository_1_0_la_CPPFLAGS = $(GIREPO_CFLAGS) -DG_IREPOSITORY_COMPILATION
-libgirepository_1_0_la_LIBADD = $(GIREPO_LIBS)
-libgirepository_1_0_la_LDFLAGS = -no-undefined -version-number 1:0:0
-
-libgirepository_parser_la_SOURCES = \
- girmodule.c \
- girmodule.h \
- girnode.c \
- girnode.h \
- giroffsets.c \
- girparser.c \
- girparser.h \
- girwriter.c \
- girwriter.h
-libgirepository_parser_la_CFLAGS = $(GIREPO_CFLAGS)
-
-gdumpdir = $(datadir)/gobject-introspection-1.0/
-gdump_DATA = gdump.c
+++ /dev/null
-## Process this file with automake to produce Makefile.in
-
-INCLUDES = -I$(top_srcdir)/girepository
-BUILT_SOURCES = \
- scannerparser.c \
- scannerparser.h \
- scannerlexer.c \
- scannerlexer.h
-
-CLEANFILES = \
- scannerparser.c \
- scannerparser.h \
- scannerlexer.c \
- scannerlexer.h
-AM_YFLAGS = -d -t
-
-# Why do I have to do this automake?
-scannerlexer.h: scannerlexer.c
-
-noinst_LTLIBRARIES = libgiscanner.la
-
-libgiscanner_la_SOURCES = \
- sourcescanner.c \
- sourcescanner.h \
- scannerlexer.l \
- scannerparser.y \
- grealpath.h
-libgiscanner_la_LIBADD = $(GOBJECT_LIBS)
-libgiscanner_la_CFLAGS = $(GOBJECT_CFLAGS)
-
-# Python module
-pkgpyexecdir = $(pkglibdir)/giscanner
-pkgpyexec_LTLIBRARIES = _giscanner.la
-pkgpyexec_PYTHON = \
- __init__.py \
- annotationmain.py \
- annotationparser.py \
- ast.py \
- cachestore.py \
- codegen.py \
- config.py \
- dumper.py \
- introspectablepass.py \
- girparser.py \
- girwriter.py \
- gdumpparser.py \
- libtoolimporter.py \
- odict.py \
- maintransformer.py \
- message.py \
- shlibs.py \
- scannermain.py \
- sourcescanner.py \
- testcodegen.py \
- transformer.py \
- utils.py \
- xmlwriter.py
-
-_giscanner_la_CFLAGS = \
- $(PYTHON_INCLUDES) \
- $(GOBJECT_CFLAGS) \
- -I$(top_srcdir)/giscanner
-_giscanner_la_LIBADD = libgiscanner.la $(GOBJECT_LIBS)
-
-_giscanner_la_LDFLAGS = \
- -module -avoid-version -export-symbols-regex init_giscanner
-
-if OS_WIN32
-# Yuck. Probably there is a way to get this from Python, but I don't
-# know how. Use -Wl to avoid libtool crack.
-_giscanner_la_LDFLAGS += -Wl,$(pyexecdir)/../../libs/libpython25.a -no-undefined
-endif
-
-_giscanner_la_SOURCES = giscannermodule.c
-
-if OS_WIN32
-BUILT_SOURCES += _giscanner.pyd
-CLEANFILES += _giscanner.pyd
-
-_giscanner.pyd: _giscanner.la
- cp .libs/_giscanner.dll $@
-
-install-exec-hook:
- mv $(pkgpyexecdir)/_giscanner.dll $(pkgpyexecdir)/_giscanner.pyd
- rm $(pkgpyexecdir)/_giscanner.dll.a
- rm $(pkgpyexecdir)/_giscanner.la
-endif
init_giscanner(void)
{
PyObject *m, *d;
-
- m = Py_InitModule ("giscanner._giscanner",
+ gboolean is_uninstalled;
+
+ /* Hack to avoid having to create a fake directory structure; when
+ * running uninstalled, the module will be in the top builddir,
+ * with no _giscanner prefix.
+ */
+ is_uninstalled = g_getenv ("UNINSTALLED_INTROSPECTION_SRCDIR") != NULL;
+ m = Py_InitModule (is_uninstalled ? "_giscanner" : "giscanner._giscanner",
(PyMethodDef*)pyscanner_functions);
d = PyModule_GetDict (m);
from .libtoolimporter import LibtoolImporter
from .message import Position
+with LibtoolImporter(None, None):
+ if 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ:
+ from _giscanner import SourceScanner as CSourceScanner
+ else:
+ from giscanner._giscanner import SourceScanner as CSourceScanner
+
(CSYMBOL_TYPE_INVALID,
CSYMBOL_TYPE_ELLIPSIS,
CSYMBOL_TYPE_CONST,
class SourceScanner(object):
def __init__(self):
- with LibtoolImporter(None, None):
- from giscanner._giscanner import SourceScanner
- self._scanner = SourceScanner()
+ self._scanner = CSourceScanner()
self._filenames = []
self._cpp_options = []
from __future__ import with_statement
+import os
+
from contextlib import contextmanager
from cStringIO import StringIO
from xml.sax.saxutils import escape, quoteattr
with LibtoolImporter(None, None):
- from giscanner._giscanner import collect_attributes
+ if 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ:
+ from _giscanner import collect_attributes
+ else:
+ from giscanner._giscanner import collect_attributes
class XMLWriter(object):
nodist_gitestoffsets_SOURCES = gitestoffsets.c
gitestoffsets_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
-gitestoffsets_LDADD = $(top_builddir)/girepository/libgirepository-1.0.la $(GIREPO_LIBS)
+gitestoffsets_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS)
gitestoffsets.c: gen-gitestoffsets offsets.h
$(AM_V_GEN) $(PYTHON) $(srcdir)/gen-gitestoffsets $(srcdir)/offsets.h > $@ || ( rm -f $@ && false )
gitestrepo_SOURCES = $(srcdir)/gitestrepo.c
gitestrepo_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
-gitestrepo_LDADD = $(top_builddir)/girepository/libgirepository-1.0.la $(GIREPO_LIBS)
+gitestrepo_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS)
gitestthrows_SOURCES = $(srcdir)/gitestthrows.c
gitestthrows_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
-gitestthrows_LDADD = $(top_builddir)/girepository/libgirepository-1.0.la $(GIREPO_LIBS)
+gitestthrows_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS)
TESTS = gitestrepo gitestthrows
TESTS_ENVIRONMENT=env top_builddir="$(top_builddir)" \
- XDG_DATA_DIRS="$(top_srcdir)/gir:$(XDG_DATA_DIRS)" $(DEBUG)
\ No newline at end of file
+ XDG_DATA_DIRS="$(top_srcdir)/gir:$(XDG_DATA_DIRS)" $(DEBUG)
libannotation_la_SOURCES = $(srcdir)/annotation.c $(srcdir)/annotation.h
libtestinherit_la_SOURCES = $(srcdir)/drawable.c $(srcdir)/drawable.h
libfoo_la_SOURCES = $(srcdir)/foo.c $(srcdir)/foo.h
-libfoo_la_LIBADD = $(top_builddir)/girepository/libgirepository-1.0.la
+libfoo_la_LIBADD = $(top_builddir)/libgirepository-1.0.la
libutility_la_SOURCES = $(srcdir)/utility.c $(srcdir)/utility.h
libgtkfrob_la_SOURCES = $(srcdir)/gtkfrob.c $(srcdir)/gtkfrob.h
libregress_la_SOURCES = $(srcdir)/regress.c $(srcdir)/regress.h
BUILT_SOURCES = $(TYPELIBS) $(GIRS)
EXTRA_DIST = $(EXPECTEDGIRS)
-Regress-1.0.gir: $(top_builddir)/gir/Gio-2.0.gir libregress.la
+Regress-1.0.gir: $(top_builddir)/Gio-2.0.gir libregress.la
Regress_1_0_gir_LIBS = libregress.la
Regress_1_0_gir_INCLUDES = cairo-1.0 Gio-2.0
Regress_1_0_gir_FILES = $(libregress_la_SOURCES)
noinst_PROGRAMS = barapp
barapp_SOURCES = $(srcdir)/barapp.c $(srcdir)/barapp.h
-barapp_LDADD = $(top_builddir)/girepository/libgirepository-1.0.la
+barapp_LDADD = $(top_builddir)/libgirepository-1.0.la
barapp_LDFLAGS = -export-dynamic
Bar-1.0.gir: barapp
EXTRA_DIST = warningtester.py common.h $(TESTS)
-TESTS_ENVIRONMENT = PYTHONPATH=$(top_builddir):$(top_srcdir) TOP_BUILDDIR=$(top_builddir) $(PYTHON) $(srcdir)/warningtester.py
+TESTS_ENVIRONMENT = PYTHONPATH=$(top_builddir):$(top_srcdir) TOP_BUILDDIR=$(top_builddir) UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) $(PYTHON) $(srcdir)/warningtester.py
import sys
from StringIO import StringIO
+path=os.getenv('UNINSTALLED_INTROSPECTION_SRCDIR', None)
+assert path is not None
+sys.path.insert(0, path)
+
from giscanner.annotationparser import AnnotationParser
from giscanner.ast import Include, Namespace
from giscanner.introspectablepass import IntrospectablePass
+++ /dev/null
-INCLUDES = \
- -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\"" \
- -I$(top_srcdir)/girepository
-
-bin_PROGRAMS = g-ir-compiler g-ir-generate
-bin_SCRIPTS = g-ir-scanner g-ir-annotation-tool
-EXTRA_DIST = g-ir-scanner.in g-ir-annotation-tool.in
-
-g-ir-scanner: g-ir-scanner.in Makefile
- $(AM_V_GEN) sed -e s,@libdir\@,$(libdir), -e s,@PYTHON\@,$(PYTHON), $< > $@.tmp && mv $@.tmp $@
- @chmod a+x $@
-
-g-ir-annotation-tool: g-ir-annotation-tool.in Makefile
- $(AM_V_GEN) sed -e s,@libdir\@,$(libdir), -e s,@PYTHON\@,$(PYTHON), $< > $@.tmp && mv $@.tmp $@
- @chmod a+x $@
-
-g_ir_compiler_SOURCES = compiler.c
-g_ir_compiler_CFLAGS = $(GIREPO_CFLAGS)
-g_ir_compiler_LDADD = \
- $(top_builddir)/girepository/libgirepository-parser.la \
- $(top_builddir)/girepository/libgirepository-1.0.la \
- $(GIREPO_LIBS)
-
-g_ir_generate_SOURCES = generate.c
-g_ir_generate_CFLAGS = $(GIREPO_CFLAGS)
-g_ir_generate_LDADD = \
- $(top_builddir)/girepository/libgirepository-parser.la \
- $(top_builddir)/girepository/libgirepository-1.0.la \
- $(GIREPO_LIBS)
-
-GCOVSOURCES = \
- $(g_ir_compiler_SOURCES) \
- $(g_ir_generate_SOURCES)
-
-CLEANFILES=g-ir-scanner g-ir-annotation-tool