summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorPhilip Chimento <philip@endlessm.com>2013-04-10 17:32:26 +0100
committerP. F. Chimento <philip.chimento@gmail.com>2013-04-17 17:15:52 +0200
commit733dbac3f86b8c7393c9e8a127f4cc09e905785d (patch)
treeef1f1986638f4cd838f1a3f7f4914709c2f33ec0 /Makefile.am
parent6347c78610a7197e1d0cedd1a4a2136a595b5a67 (diff)
Enable GObject introspection
After running 'make install', run test/smoke-tests/introspection.js (and its Python counterpart) to test whether the GIR has been installed correctly. [#1]
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am40
1 files changed, 38 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 8471840..e483381 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,8 +20,9 @@ EXTRA_DIST = @EOS_SDK_API_NAME@.pc.in
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
AM_CFLAGS = @STRICT_CFLAGS@
-# Make sure to run Gtk-doc tests when doing 'make distcheck'
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+# Make sure to run Gtk-doc tests and build the introspection files when doing
+# 'make distcheck'
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
# Generated files that 'make clean' should erase
CLEANFILES =
@@ -43,6 +44,41 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = @EOS_SDK_API_NAME@.pc
DISTCLEANFILES += @EOS_SDK_API_NAME@.pc
+# # # INTROSPECTION FILES # # #
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = \
+ $(filter-out %-private.h, $(endless_library_sources)) \
+ $(endless_public_installed_headers) \
+ $(endless_private_installed_headers)
+
+Endless-@EOS_SDK_API_VERSION@.gir: libendless-@EOS_SDK_API_VERSION@.la
+Endless_@EOS_SDK_API_VERSION@_gir_INCLUDES = \
+ GObject-2.0 GLib-2.0 Gio-2.0 Gtk-3.0
+Endless_@EOS_SDK_API_VERSION@_gir_SCANNERFLAGS = \
+ --identifier-prefix=Eos \
+ --symbol-prefix=eos \
+ -DCOMPILING_EOS_SDK
+# Endless_@EOS_SDK_API_VERSION@_gir_CFLAGS = $(INCLUDES)
+Endless_@EOS_SDK_API_VERSION@_gir_LIBS = libendless-@EOS_SDK_API_VERSION@.la
+Endless_@EOS_SDK_API_VERSION@_gir_FILES = $(introspection_sources)
+Endless_@EOS_SDK_API_VERSION@_gir_EXPORT_PACKAGES = @EOS_SDK_API_NAME@
+INTROSPECTION_GIRS += Endless-@EOS_SDK_API_VERSION@.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(gir_DATA) $(typelib_DATA)
+endif
+
# # # TESTS # # #
include $(top_srcdir)/test/Makefile.am