]> git.meshlink.io Git - catta/blobdiff - avahi-gobject/Makefile.am
avahi-discover: Fix type being inserted into tree model (Bug #332)
[catta] / avahi-gobject / Makefile.am
index b2a09c753ed66559a76d9198d8b43b329f46d0fe..02f2b9483b4bbed6a5fa68bf844b50130d888999 100644 (file)
@@ -1,5 +1,3 @@
-# $Id$
-#
 # This file is part of avahi.
 #
 # avahi is free software; you can redistribute it and/or modify it
@@ -22,6 +20,9 @@ AM_CFLAGS=-I$(top_srcdir)
 # This cool debug trap works on i386/gcc only
 AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
 
+EXTRA_DIST = \
+       AvahiCore-0.6.gir
+
 if HAVE_GOBJECT
 if HAVE_DBUS
 
@@ -88,8 +89,7 @@ signals-marshal.h: signals-marshal.list
        $(AM_V_GEN)glib-genmarshal --header --prefix=_ga_signals_marshal $< > $@
 
 signals-marshal.c: signals-marshal.list
-       $(AM_V_GEN)glib-genmarshal --body --prefix=_ga_signals_marshal $< > $@
-
+       $(AM_V_GEN)(echo "#include \"signals-marshal.h\"" ; glib-genmarshal --body --prefix=_ga_signals_marshal $< ) > $@
 
 # rules for making the glib enum objects
 %-enumtypes.h: %.h Makefile.in
@@ -102,13 +102,39 @@ signals-marshal.c: signals-marshal.list
 
 %-enumtypes.c: %.h Makefile.in
        $(AM_V_GEN)glib-mkenums \
-       --fhead "#include <$*.h>" \
+       --fhead "#include <$*.h>\n#include<$*-enumtypes.h>" \
        --fprod "\n/* enumerations from \"@filename@\" */" \
        --vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {"     \
        --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@VALUENAME@\" }," \
        --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
        $< > $@
 
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = $(libavahi_gobject_la_SOURCES)
+
+Avahi-0.6.gir: $(lib_LTLIBRARIES)
+Avahi_0_6_gir_INCLUDES = GObject-2.0 AvahiCore-0.6
+Avahi_0_6_gir_CFLAGS = $(libavahi_gobject_la_CFLAGS)
+Avahi_0_6_gir_LIBS = $(lib_LTLIBRARIES)
+Avahi_0_6_gir_FILES = $(addprefix $(srcdir)/, $(CORE_SOURCES)) $(BUILT_SOURCES)
+Avahi_0_6_gir_SCANNERFLAGS = --strip-prefix=Ga
+INTROSPECTION_GIRS += Avahi-0.6.gir
+INTROSPECTION_INSTALL_GIRS = AvahiCore-0.6.gir $(INTROSPECTION_GIRS)
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_INSTALL_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_INSTALL_GIRS:.gir=.typelib)
+
+CLEANFILES += $(INTROSPECTION_GIRS) $(typelib_DATA)
+endif
+
 endif
 endif