[emerillon/gtk3] cleanup gir generation



commit ed16819be3c56c68685ac53c3795bbf8b759c910
Author: Simon Wenner <simon wenner ch>
Date:   Wed Aug 10 23:05:50 2011 +0200

    cleanup gir generation
    
    https://bugzilla.gnome.org/show_bug.cgi?id=649403

 emerillon/Makefile.am |   49 ++++++++++++++++++++++++-------------------------
 1 files changed, 24 insertions(+), 25 deletions(-)
---
diff --git a/emerillon/Makefile.am b/emerillon/Makefile.am
index cae2361..de87f9b 100644
--- a/emerillon/Makefile.am
+++ b/emerillon/Makefile.am
@@ -37,42 +37,41 @@ emerillon_LDFLAGS = -export-dynamic
 
 emerillon_LDADD = libemerillon.la $(EMERILLON_LIBS)
 
-if HAVE_INTROSPECTION
-EMERILLON_CFLAGS += $(INTROSPECTION_CFLAGS)
-emerillon_LDADD += $(INTROSPECTION_LIBS)
-endif
-
 CLEANFILES = $(BUILT_SOURCES)
 
+API_H_FILES =           \
+	emerillon.h     \
+	window.h        \
+	sidebar.h
+
 headerdir = $(prefix)/include/emerillon- EMERILLON_API_VERSION@/emerillon
 header_DATA = $(API_H_FILES)
 
-API_H_FILES =			\
-	emerillon.h			\
-	window.h			\
-	sidebar.h
-
-if HAVE_INTROSPECTION
+# introspection support
 -include $(INTROSPECTION_MAKEFILE)
-INTROSPECTION_GIRS = Emerillon-0.1.gir
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
 
-  introspection_sources = $(libemerillon_la_SOURCES)
+if HAVE_INTROSPECTION
+introspection_sources = $(filter %.c,$(libemerillon_la_SOURCES)) $(API_H_FILES)
 
-  Emerillon-0.1.gir: $(libemerillon_la_SOURCES) $(bin_PROGRAMS)
-  Emerillon_0_1_gir_INCLUDES = GObject-2.0 Gtk-3.0 Clutter-1.0 Champlain-0.10 GtkChamplain-0.10
-  Emerillon_0_1_gir_CFLAGS =  -I$(top_srcdir) $(EMERILLON_CFLAGS) -DEMERILLON_COMPILATION
-  Emerillon_0_1_gir_PROGRAM = ./$(bin_PROGRAMS)
-  Emerillon_0_1_gir_FILES = $(top_srcdir)/emerillon/emerillon.h $(top_srcdir)/emerillon/window.h $(top_srcdir)/emerillon/sidebar.h
+Emerillon-0.1.gir: emerillon
+Emerillon_0_1_gir_NAMESPACE = Emerillon
+Emerillon_0_1_gir_VERSION = 0.1
+Emerillon_0_1_gir_PROGRAM = emerillon
+Emerillon_0_1_gir_FILES = $(introspection_sources)
+Emerillon_0_1_gir_INCLUDES = GObject-2.0 Gtk-3.0 Champlain-0.10
+Emerillon_0_1_gir_CFLAGS = -DEMERILLON_COMPILATION -I$(top_srcdir)
+INTROSPECTION_GIRS += Emerillon-0.1.gir
 
-  girdir = $(datadir)/gir-1.0
-  dist_gir_DATA = $(INTROSPECTION_GIRS)
+girdir = $(datadir)/gir-1.0
+dist_gir_DATA = $(INTROSPECTION_GIRS)
 
-  typelibdir = $(libdir)/girepository-1.0
-  typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 
-CLEANFILES += \
-	$(dist_gir_DATA)		\
-	$(typelib_DATA)
+CLEANFILES += $(dist_gir_DATA) $(typelib_DATA)
 endif
 
 dist-hook:



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