Commit 293fa333 authored by Jens Georg's avatar Jens Georg
Browse files

Update gobject-introspection autotools integration

parent 45ff0c47
......@@ -42,6 +42,24 @@ libgupnpinc_HEADERS = gupnp-context.h \
gupnp-types.h \
gupnp.h
introspection_sources = $(libgupnpinc_HEADERS) \
gupnp-context.c \
gupnp-context-manager.c \
gupnp-control-point.c \
gupnp-device.c \
gupnp-device-info.c \
gupnp-device-proxy.c \
gupnp-error.c \
gupnp-resource-factory.c \
gupnp-root-device.c \
gupnp-service.c \
gupnp-service-info.c \
gupnp-service-proxy.c \
gupnp-service-introspection.c \
gupnp-xml-doc.c \
gupnp-types.c
gupnp-marshal.c: gupnp-marshal.list
$(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=gupnp_marshal $(srcdir)/gupnp-marshal.list --header --body > gupnp-marshal.c
......@@ -52,32 +70,18 @@ BUILT_SOURCES = gupnp-marshal.c gupnp-marshal.h
libgupnp_1_0_la_LDFLAGS = -version-info $(LTVERSION)
libgupnp_1_0_la_SOURCES = http-headers.c \
libgupnp_1_0_la_SOURCES = $(introspection_sources) \
http-headers.c \
http-headers.h \
gupnp-context.c \
gupnp-context-private.h \
gupnp-context-manager.c \
$(CONTEXT_MANAGER_IMPL) \
$(CONTEXT_MANAGER_IMPL) \
gupnp-unix-context-manager.c \
gupnp-unix-context-manager.h \
gupnp-control-point.c \
gupnp-device.c \
gupnp-device-info.c \
gupnp-device-info-private.h \
gupnp-device-proxy.c \
gupnp-error.c \
gupnp-error-private.h \
gupnp-resource-factory.c \
gupnp-resource-factory-private.h \
gupnp-root-device.c \
gupnp-service.c \
gupnp-service-info.c \
gupnp-service-proxy.c \
gupnp-service-introspection.c \
gupnp-service-introspection-private.h \
gupnp-xml-doc.c \
gupnp-types.c \
gupnp-types-private.h \
gupnp-resource-factory-private.h \
gupnp-service-introspection-private.h \
gupnp-types-private.h \
gvalue-util.c \
gvalue-util.h \
xml-util.c \
......@@ -93,55 +97,30 @@ EXTRA_DIST = gupnp-marshal.list \
gupnp-unix-context-manager.c \
gupnp-unix-context-manager.h
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --warn-all \
--symbol-prefix=gupnp \
--identifier-prefix=GUPnP \
--add-include-path=$(top_srcdir)
INTROSPECTION_COMPILER_ARGS = --includedir=$(top_srcdir)
if HAVE_INTROSPECTION
GUPnP-1.0.gir: libgupnp-1.0.la
GUPnP_1_0_gir_INCLUDES = libxml2-2.0 GObject-2.0 Soup-2.4 GSSDP-1.0
GUPnP_1_0_gir_CFLAGS = $(INCLUDES) $(AM_CFLAGS)
GUPnP_1_0_gir_LIBS = libgupnp-1.0.la
GUPnP_1_0_gir_FILES = $(introspection_sources)
GUPnP_1_0_gir_NAMESPACE = GUPnP
GUPnP_1_0_gir_VERSION = 1.0
GUPnP-1.0.gir: libgupnp-1.0.la $(INTROSPECTION_SCANNER)
$(AM_V_GEN) \
$(INTROSPECTION_SCANNER) -v \
--namespace=GUPnP --nsversion=1.0 \
--include=libxml2-2.0 \
--include=GObject-2.0 \
--include=Soup-2.4 \
--include=GSSDP-1.0 \
--library=$< \
--libtool="$(top_builddir)/libtool" \
--pkg libxml-2.0 \
--pkg gobject-2.0 \
--pkg gssdp-1.0 \
--pkg libsoup-2.4 \
--output $@ \
-I$(top_srcdir) \
$(addprefix $(top_srcdir)/libgupnp/, $(libgupnpinc_HEADERS)) \
$(top_srcdir)/libgupnp/gupnp-context.c \
$(top_srcdir)/libgupnp/gupnp-context-manager.c \
$(top_srcdir)/libgupnp/gupnp-control-point.c \
$(top_srcdir)/libgupnp/gupnp-device.c \
$(top_srcdir)/libgupnp/gupnp-device-info.c \
$(top_srcdir)/libgupnp/gupnp-device-proxy.c \
$(top_srcdir)/libgupnp/gupnp-error.c \
$(top_srcdir)/libgupnp/gupnp-resource-factory.c \
$(top_srcdir)/libgupnp/gupnp-root-device.c \
$(top_srcdir)/libgupnp/gupnp-service.c \
$(top_srcdir)/libgupnp/gupnp-service-info.c \
$(top_srcdir)/libgupnp/gupnp-service-proxy.c \
$(top_srcdir)/libgupnp/gupnp-service-introspection.c \
$(top_srcdir)/libgupnp/gupnp-xml-doc.c \
$(top_srcdir)/libgupnp/gupnp-types.c
INTROSPECTION_GIRS += GUPnP-1.0.gir
girdir = $(datadir)/gir-1.0
gir_DATA = GUPnP-1.0.gir
typelibdir = $(libdir)/girepository-1.0/
typelib_DATA = $(gir_DATA:.gir=.typelib)
%.typelib: %.gir $(INTROSPECTION_COMPILER)
$(AM_V_GEN) \
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=. \
$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
endif
CLEANFILES = $(BUILT_SOURCES) $(gir_DATA) $(typelib_DATA)
......
......@@ -59,12 +59,18 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
fi
AC_SUBST(INTROSPECTION_SCANNER)
AC_SUBST(INTROSPECTION_COMPILER)
AC_SUBST(INTROSPECTION_GENERATE)
AC_SUBST(INTROSPECTION_GIRDIR)
AC_SUBST(INTROSPECTION_TYPELIBDIR)
AC_SUBST(INTROSPECTION_CFLAGS)
AC_SUBST(INTROSPECTION_LIBS)
AC_SUBST(INTROSPECTION_MAKEFILE)
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment