summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2012-11-26 22:45:25 +0100
committerMike Gorse <mgorse@suse.com>2012-11-27 07:22:56 -0600
commit7066928c09f14bbe9b0a49f526769d75fc44ef16 (patch)
treefa62f5dcafb09ad3a9109e3b7825ce2a28499703
parent281a6aa3279769c9eb7123bf8a0ecde04ecb19ab (diff)
downloadat-spi2-core-7066928c09f14bbe9b0a49f526769d75fc44ef16.tar.gz
build: Use gobject-introspection's Makefile instead of rolling our own
Invoking the GI compiler through libtool would cause us to embed an RPATH in our binaries. https://bugzilla.gnome.org/show_bug.cgi?id=640303
-rw-r--r--atspi/Makefile.am52
1 files changed, 20 insertions, 32 deletions
diff --git a/atspi/Makefile.am b/atspi/Makefile.am
index 12810cc2..f89d13af 100644
--- a/atspi/Makefile.am
+++ b/atspi/Makefile.am
@@ -109,44 +109,32 @@ libatspi_la_SOURCES = \
#atspi-constants.h: $(top_srcdir)/xml/spec.xml $(top_srcdir)/tools/c-constants-gen.py
# python $(top_srcdir)/tools/c-constants-gen.py Atspi $(top_srcdir)/xml/spec.xml atspi-constants
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
if HAVE_INTROSPECTION
-INTROSPECTION_FILES = $(libatspi_la_SOURCES)
-
-Atspi-2.0.gir: $(INTROSPECTION_SCANNER) \
- libatspi.la \
- $(INTROSPECTION_FILES)
- $(AM_V_GEN)$(INTROSPECTION_SCANNER) -v \
- --namespace Atspi \
- --nsversion=2.0 \
- -I$(top_builddir) \
- -I$(top_srcdir) \
- --include=GLib-2.0 \
- --include=GObject-2.0 \
- --libtool="$(top_builddir)/libtool" \
- --library=libatspi.la \
- --library=$(top_builddir)/dbind/libdbind.la \
- --pkg dbus-1 \
- --pkg-export atspi-2 \
- --c-include "atspi/atspi.h" \
- --warn-all \
- --output $@ \
- $(addprefix $(srcdir)/, $(INTROSPECTION_FILES))
-girdir = $(datadir)/gir-1.0
-gir_DATA = Atspi-2.0.gir
+Atspi-2.0.gir: libatspi.la
+Atspi_2_0_gir_INCLUDES = GLib-2.0 GObject-2.0
+Atspi_2_0_gir_PACKAGES = dbus-1
+Atspi_2_0_gir_EXPORT_PACKAGES = atspi-2
+Atspi_2_0_gir_CFLAGS = -I$(top_builddir) -I$(top_srcdir)
+Atspi_2_0_gir_LIBS = libatspi.la $(top_builddir)/dbind/libdbind.la
+Atspi_2_0_gir_FILES = $(libatspi_la_SOURCES)
+Atspi_2_0_gir_SCANNERFLAGS = --namespace Atspi --nsversion=2.0
+INTROSPECTION_SCANNER_ARGS += --c-include='atspi/atspi.h'
+INTROSPECTION_GIRS += Atspi-2.0.gir
-%.typelib: %.gir $(INTROSPECTION_COMPILER)
- $(AM_V_GEN)$(top_builddir)/libtool --mode=execute \
- $(INTROSPECTION_COMPILER) \
- --includedir=$(srcdir) \
- --includedir=. \
- $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
-typelibsdir = $(libdir)/girepository-1.0/
-typelibs_DATA = $(gir_DATA:.gir=.typelib)
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES = \
$(gir_DATA) \
- $(typelibs_DATA)
+ $(typelib_DATA)
endif