[anjuta] libanjuta: Fixed introspection build



commit b38945c41892f0e35e17fdbea6f87808c3e68ba2
Author: Johannes Schmid <jhs gnome org>
Date:   Tue Jul 13 18:23:33 2010 +0200

    libanjuta: Fixed introspection build

 libanjuta/Makefile.am                  |   62 ++++++++++---------------------
 libanjuta/interfaces/Makefile.am.iface |   24 ++++++++++++
 2 files changed, 44 insertions(+), 42 deletions(-)
---
diff --git a/libanjuta/Makefile.am b/libanjuta/Makefile.am
index 1af0abb..18b5478 100644
--- a/libanjuta/Makefile.am
+++ b/libanjuta/Makefile.am
@@ -217,52 +217,30 @@ EXTRA_DIST = \
 DISTCLEANFILES = \
   anjuta-enum-types.h \
   anjuta-enum-types.c \
-  stamp-anjuta-enum-types.h \
-  Anjuta-1.0.gir \
-  IAnjuta-1.0.gir \
-  Anjuta-1.0.typelib \
-  IAnjuta-1.0.typelib
+  stamp-anjuta-enum-types.h
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
 
 if HAVE_INTROSPECTION
+introspection_sources = $(libanjuta_la_SOURCES)
+
+Anjuta-1_0.gir: libanjuta.la
+Anjuta_1_0_gir_INCLUDES = GObject-2.0 Gtk-2.0
+Anjuta_1_0_gir_CFLAGS = $(ANJUTA_CFLAGS) -I$(top_srcdir)
+Anjuta_1_0_gir_LIBS = libanjuta.la
+Anjuta_1_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
+INTROSPECTION_GIRS += Anjuta-1.0.gir
+
+girdir = $(datadir)/gir-1.0
+dist_gir_DATA = $(INTROSPECTION_GIRS)
 
-girdir = $(INTROSPECTION_GIRDIR)
-gir_DATA = Anjuta-1.0.gir IAnjuta-1.0.gir
-
-typelibdir = $(INTROSPECTION_TYPELIBDIR)
-typelib_DATA = Anjuta-1.0.typelib IAnjuta-1.0.typelib
-
-Anjuta-1.0.gir: $(libanjuta_la_SOURCES) libanjuta.la
-	$(INTROSPECTION_SCANNER) --namespace Anjuta --nsversion 1.0 \
-		--include GConf-2.0 --include Gtk-2.0 \
-		--library libanjuta.la \
-		--libtool "$(LIBTOOL)" \
-		--output $@ \
-		--pkg-export libanjuta-1.0 \
-		-I$(top_srcdir) -I. \
-		$(libanjuta_la_SOURCES)
-
-# Using interfaces/*.c is not very nice but otherwise we get circular
-# dependencies : libanjuta.la depends on libanjuta-interfaces.la and
-# IAnjuta-1.0.gir depends on Anjuta-1.0.gir
-IAnjuta-1.0.gir: $(libanjuta_interfaces_la_SOURCES) interfaces/libanjuta-interfaces.la Anjuta-1.0.gir
-	$(INTROSPECTION_SCANNER) --namespace IAnjuta --nsversion 1.0 \
-		--add-include-path . \
-		--include GConf-2.0 --include Gtk-2.0 --include Anjuta-1.0 \
-		--library interfaces/libanjuta-interfaces.la \
-		--library libanjuta.la \
-		--libtool "$(LIBTOOL)" \
-		--output $@ \
-		--pkg-export libanjuta-1.0 \
-		-I$(top_srcdir) -I. \
-		interfaces/*.c \
-		interfaces/*.h
-
-Anjuta-1.0.typelib: Anjuta-1.0.gir
-	$(INTROSPECTION_COMPILER) $< -o $@
-
-IAnjuta-1.0.typelib: IAnjuta-1.0.gir Anjuta-1.0.gir
-	$(INTROSPECTION_COMPILER) --includedir . $< -o $@
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 
+CLEANFILES = $(dist_gir_DATA) $(typelib_DATA)
 endif
 
 
diff --git a/libanjuta/interfaces/Makefile.am.iface b/libanjuta/interfaces/Makefile.am.iface
index bdf7b30..0781625 100644
--- a/libanjuta/interfaces/Makefile.am.iface
+++ b/libanjuta/interfaces/Makefile.am.iface
@@ -39,3 +39,27 @@ EXTRA_DIST = \
 	$(files_idl) \
 	Makefile.am.iface \
 	anjuta-idl-compiler.pl
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = $(libanjuta_interfaces_la_SOURCES)
+
+IAnjuta-1_0.gir: libanjuta-interfaces.la
+IAnjuta_1_0_gir_INCLUDES = GObject-2.0 Gtk-2.0 Anjuta-1.0
+IAnjuta_1_0_gir_CFLAGS = $(LIBANJUTA_CFLAGS) -I$(top_srcdir)
+IAnjuta_1_0_gir_LIBS = libanjuta-interfaces.la
+IAnjuta_1_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
+INTROSPECTION_GIRS += IAnjuta-1.0.gir
+
+girdir = $(datadir)/gir-1.0
+dist_gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES = $(dist_gir_DATA) $(typelib_DATA)
+endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]