Switch to nonrecursive make for core (i.e. not tests/)
authorColin Walters <walters@verbum.org>
Thu, 4 Nov 2010 17:12:12 +0000 (13:12 -0400)
committerColin Walters <walters@verbum.org>
Tue, 9 Nov 2010 18:56:43 +0000 (13:56 -0500)
This is cleaner and faster, and prepares us better for an incoming
import of CMPH.

23 files changed:
.gitignore
Makefile-examples.am [new file with mode: 0644]
Makefile-gir.am [new file with mode: 0644]
Makefile-girepository.am [new file with mode: 0644]
Makefile-giscanner.am [new file with mode: 0644]
Makefile-tools.am [new file with mode: 0644]
Makefile.am
common.mk
configure.ac
docs/reference/Makefile.am
examples/Makefile.am [deleted file]
gir/Makefile.am [deleted file]
girepository/Makefile.am [deleted file]
giscanner/Makefile.am [deleted file]
giscanner/giscannermodule.c
giscanner/sourcescanner.py
giscanner/xmlwriter.py
tests/offsets/Makefile.am
tests/repository/Makefile.am
tests/scanner/Makefile.am
tests/warn/Makefile.am
tests/warn/warningtester.py
tools/Makefile.am [deleted file]

index 4d38d0a21e228ec3c1b343b9f99a28fe2fae8805..4d83c36196dac2a95eb30ee722b7a7935fbc3278 100644 (file)
@@ -33,7 +33,9 @@ ylwrap
 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
@@ -48,31 +50,31 @@ docs/reference/html
 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
@@ -116,8 +118,8 @@ tests/scanner/Foo-1.0.typelib
 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
diff --git a/Makefile-examples.am b/Makefile-examples.am
new file mode 100644 (file)
index 0000000..0d9cedc
--- /dev/null
@@ -0,0 +1,5 @@
+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)
diff --git a/Makefile-gir.am b/Makefile-gir.am
new file mode 100644 (file)
index 0000000..393abba
--- /dev/null
@@ -0,0 +1,203 @@
+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)
diff --git a/Makefile-girepository.am b/Makefile-girepository.am
new file mode 100644 (file)
index 0000000..fd9a51f
--- /dev/null
@@ -0,0 +1,73 @@
+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
diff --git a/Makefile-giscanner.am b/Makefile-giscanner.am
new file mode 100644 (file)
index 0000000..509cfeb
--- /dev/null
@@ -0,0 +1,82 @@
+## 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
diff --git a/Makefile-tools.am b/Makefile-tools.am
new file mode 100644 (file)
index 0000000..e4baa64
--- /dev/null
@@ -0,0 +1,33 @@
+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
index 33df173c48916d6d54218891eb16be5ed86c2a1a..1e1111538fb8fce1967798d1c704eb43931e9ad8 100644 (file)
@@ -1,11 +1,34 @@
+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
@@ -19,7 +42,7 @@ m4_DATA = m4/introspection.m4
 makedir = $(datadir)/gobject-introspection-1.0
 dist_make_DATA = Makefile.introspection
 
-EXTRA_DIST                   \
+EXTRA_DIST +=                  \
        COPYING.LGPL            \
        COPYING.GPL             \
        CONTRIBUTORS            \
index 40aff8a3d5e7a44b9d579da00b4136b1767f2fca..3514d7269fe8769d9e7b5092aefc8ea15dfd8537 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -11,7 +11,7 @@ INTROSPECTION_SCANNER = \
         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) \
@@ -20,7 +20,7 @@ INTROSPECTION_SCANNER_ARGS = \
     --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 \
index d0077c36c5d78a49a97afb10f63dd143f769e457..5c7c1dff3560b13f8ee378faebc1039013cd451f 100644 (file)
@@ -118,8 +118,9 @@ GIR_DIR="$EXPANDED_DATADIR/$GIR_SUFFIX"
 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)
 
@@ -240,18 +241,13 @@ AC_MSG_RESULT([$GLIBSRC])
 
 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
index a573fdf4fdb8d81e1b435d07fa7bf277617fdfc6..f63a590e6233d84e84ad7b1f5408d71f876029e2 100644 (file)
@@ -29,7 +29,7 @@ IGNORE_HFILES= \
     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    \
diff --git a/examples/Makefile.am b/examples/Makefile.am
deleted file mode 100644 (file)
index 681a4ca..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-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)
diff --git a/gir/Makefile.am b/gir/Makefile.am
deleted file mode 100644 (file)
index 8e835bc..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-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)
diff --git a/girepository/Makefile.am b/girepository/Makefile.am
deleted file mode 100644 (file)
index 1687322..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-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
diff --git a/giscanner/Makefile.am b/giscanner/Makefile.am
deleted file mode 100644 (file)
index 2779b70..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-## 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
index abea9858095f86469a9e3cc139a994b37f3e0e9a..a8061dbc6f3519d73a87d632938cb4fbb29e86eb 100644 (file)
@@ -678,8 +678,14 @@ DL_EXPORT(void)
 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);
 
index 20339e47384c4feae04bc11559d6c1dd13237a8f..e3968e32afb4bf8ca537184075967523c15e8d8a 100644 (file)
@@ -26,6 +26,12 @@ import tempfile
 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,
@@ -211,9 +217,7 @@ class SourceSymbol(object):
 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 = []
 
index 6ba1e6ad6608e3b1469895dadc177330b3ba25c3..a418cc40931db53970a9e2e4fc58fd44280e1301 100755 (executable)
@@ -20,6 +20,8 @@
 
 from __future__ import with_statement
 
+import os
+
 from contextlib import contextmanager
 from cStringIO import StringIO
 from xml.sax.saxutils import escape, quoteattr
@@ -68,7 +70,10 @@ def collect_attributes(tag_name, attributes, self_indent,
 
 
 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):
index 5426137a26eccd71ac3cacecae47d71b06060a04..60d37b39fcc229f0c38f1575c4fa3a4100e18e4b 100644 (file)
@@ -36,7 +36,7 @@ check_PROGRAMS += gitestoffsets
 
 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 )
index 36f738d77113dc31d3443e9456f3d416724b4558..b7ed21c02eebdff623cd4c662b599bc0ba396c81 100644 (file)
@@ -6,12 +6,12 @@ noinst_PROGRAMS = gitestrepo gitestthrows
 
 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)
index 1801c451f657c5877ab15dae7ec383d882b43f2b..a7dbc0a7bf3fb80e71b8acb02413927110ed2dca 100644 (file)
@@ -26,7 +26,7 @@ LIBS = $(GOBJECT_LIBS) $(GTHREAD_LIBS)
 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
@@ -52,7 +52,7 @@ CLEANFILES = $(TYPELIBS) $(GIRS)
 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)
@@ -101,7 +101,7 @@ GIRS += GtkFrob-1.0.gir
 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
index 3cd44b0014b0c63fe2df34fde1c18594254bba1a..8b44cfcb463190a3322aad74b753188ff25a67ad 100644 (file)
@@ -15,5 +15,5 @@ TESTS = \
 
 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
 
index d43b6d5e2dc4819d4ae166e15dacf49d737d48a0..f8f556550cdab56eaf876460776113e28aa82c44 100644 (file)
@@ -4,6 +4,10 @@ import os.path
 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
diff --git a/tools/Makefile.am b/tools/Makefile.am
deleted file mode 100644 (file)
index 9d96b6a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-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