[gobject-introspection] Move Everything into gir/, since it's a public library



commit b2da39874d5beca5cd1dcfbd91def27c0aad517b
Author: Colin Walters <walters verbum org>
Date:   Thu Jun 4 15:35:01 2009 -0400

    Move Everything into gir/, since it's a public library
    
    Everything isn't a test for quite a while now, it's a public library.
    So move it to gir/.
---
 configure.ac                                       |    1 -
 .../everything => gir}/Everything-1.0-expected.gir |    0
 gir/Makefile.am                                    |   35 ++++++++++++
 {tests/everything => gir}/everything.c             |   27 +++++-----
 {tests/everything => gir}/everything.h             |    0
 tests/Makefile.am                                  |    2 +-
 tests/everything/Makefile.am                       |   56 --------------------
 7 files changed, 49 insertions(+), 72 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5487e75..c342930 100644
--- a/configure.ac
+++ b/configure.ac
@@ -207,7 +207,6 @@ tests/invoke/Makefile
 tests/offsets/Makefile
 tests/scanner/Makefile
 tests/repository/Makefile
-tests/everything/Makefile
 examples/Makefile
 docs/Makefile
 docs/reference/Makefile
diff --git a/tests/everything/Everything-1.0-expected.gir b/gir/Everything-1.0-expected.gir
similarity index 100%
rename from tests/everything/Everything-1.0-expected.gir
rename to gir/Everything-1.0-expected.gir
diff --git a/gir/Makefile.am b/gir/Makefile.am
index f9b4efc..cf4791c 100644
--- a/gir/Makefile.am
+++ b/gir/Makefile.am
@@ -1,5 +1,6 @@
 include $(top_srcdir)/common.mk
 
+CHECKGIRS =
 BUILT_GIRSOURCES = 
 CLEANFILES =
 EXTRA_DIST = 
@@ -163,6 +164,35 @@ GIRepository-2.0.gir: GObject-2.0.gir $(SCANNER_BIN) $(SCANNER_LIBS) $(GIREPOSIT
 	    $(GIREPOSITORY_FILES)
 BUILT_GIRSOURCES += GIRepository-2.0.gir
 
+LT_CURRENT = 1
+LT_REVISION = 0
+LT_AGE = 0
+LT_VERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+TYPELIB_VERSION = $(LT_CURRENT).0
+
+lib_LTLIBRARIES = libgirepository-everything-1.0.la
+
+libgirepository_everything_1_0_la_SOURCES = $(srcdir)/everything.c $(srcdir)/everything.h
+libgirepository_everything_1_0_la_CFLAGS = $(GOBJECT_CFLAGS)
+libgirepository_everything_1_0_la_LDFLAGS = -version-info $(LT_VERSION)
+libgirepository_everything_1_0_la_LIBS = $(GOBJECT_LIBS)
+
+if OS_WIN32
+libgirepository_everything_1_0_la_LDFLAGS += -no-undefined
+endif
+
+Everything-$(TYPELIB_VERSION).gir: libgirepository-everything-1.0.la everything.c everything.h $(SCANNER_BIN) $(SCANNER_LIBS)
+	$(CHECK_DEBUG) $(SCANNER) \
+	--include=GObject-2.0 \
+        --libtool="$(SHAVE_SAVED_LIBTOOL)" \
+	--library=girepository-everything-1.0 \
+	--namespace=Everything --nsversion=$(TYPELIB_VERSION) \
+	--pkg gobject-2.0 \
+	$(srcdir)/everything.h $(srcdir)/everything.c \
+	--output $@
+BUILT_GIRSOURCES += Everything-$(TYPELIB_VERSION).gir
+CHECKGIRS += Everything-$(TYPELIB_VERSION)-expected.gir
+
 # Generic rules
 CLEANFILES += $(BUILT_GIRSOURCES)
 
@@ -181,6 +211,11 @@ typelibs_DATA = $(GIRSOURCES:.gir=.typelib) $(GIRSOURCES:.gir=.typelib)
 
 CLEANFILES += $(typelibs_DATA)
 
+%.gir.check: %.gir
+	@diff -u -U 10 $(srcdir)/$*-expected.gir $*.gir && echo "  TEST  $*.gir"
+
+check-local: $(CHECKGIRS)
+
 # Check that typelib -> gir -> typelib transformation is lossless.
 # Comparing gir files is relatively fragile (whitespace, attribute default
 # values, etc.) but the typelibs should identical as long as the gir files are
diff --git a/tests/everything/everything.c b/gir/everything.c
similarity index 99%
rename from tests/everything/everything.c
rename to gir/everything.c
index f2a2e30..e592399 100644
--- a/tests/everything/everything.c
+++ b/gir/everything.c
@@ -179,7 +179,7 @@ const GValue *test_value_return(int i) {
 static const char utf8_const[]    = "const \xe2\x99\xa5 utf8";
 static const char utf8_nonconst[] = "nonconst \xe2\x99\xa5 utf8";
 
-/** 
+/**
  * test_utf8_const_return:
  * Return value: <const char*> UTF-8 string
  */
@@ -189,7 +189,7 @@ G_CONST_RETURN char *test_utf8_const_return (void)
   return utf8_const;
 }
 
-/** 
+/**
  * test_utf8_nonconst_return:
  * Return value: <char*> UTF-8 string
  */
@@ -357,7 +357,7 @@ test_strv_in_container (char **arr)
 
 /**
  * test_array_gtype_in:
- * @n_types: 
+ * @n_types:
  * @types: (array length=n_types): List of types
  * Return value: string representation of provided types
  * */
@@ -914,12 +914,11 @@ test_enum_param(TestEnum e)
   GEnumValue *ev;
   GEnumClass *ec;
 
-  ec = g_type_class_ref (test_enum_get_type ());  
+  ec = g_type_class_ref (test_enum_get_type ());
   ev = g_enum_get_value (ec, e);
   g_type_class_unref (ec);
 
   return ev->value_nick;
-  
 }
 
 /* structures */
@@ -1194,7 +1193,7 @@ test_obj_class_init (TestObjClass *klass)
   gobject_class->set_property = test_obj_set_property;
   gobject_class->get_property = test_obj_get_property;
   gobject_class->dispose = test_obj_dispose;
-  
+
   pspec = g_param_spec_object ("bare",
                                "Bare property",
                                "A contained object",
@@ -1295,7 +1294,7 @@ static GSList *notified_callbacks = NULL;
 
 /**
  * test_callback_destroy_notify:
- * @callback: (scope notified): 
+ * @callback: (scope notified):
  *
  * Notified - callback persists until a DestroyNotify delegate
  * is invoked.
@@ -1307,14 +1306,14 @@ test_callback_destroy_notify (TestCallbackUserData callback,
 {
   int retval;
   CallbackInfo *info;
-  
+
   retval = callback(user_data);
-  
+
   info = g_new(CallbackInfo, 1);
   info->callback = callback;
   info->notify = notify;
   info->user_data = user_data;
-  
+
   notified_callbacks = g_slist_prepend(notified_callbacks, info);
 
   return retval;
@@ -1334,7 +1333,7 @@ test_callback_thaw_notifications (void)
 {
   int retval = 0;
   GSList *node;
-  
+
   for (node = notified_callbacks; node != NULL; node = node->next)
     {
       CallbackInfo *info = (CallbackInfo *)node->data;
@@ -1346,13 +1345,13 @@ test_callback_thaw_notifications (void)
 
   g_slist_free (notified_callbacks);
   notified_callbacks = NULL;
-  
+
   return retval;
 }
 
 /**
  * test_callback_infinte:
- * @callback: (scope infinte): 
+ * @callback: (scope infinte):
  *
  * Infinite - callback persists forever.
  **/
@@ -1364,7 +1363,7 @@ test_callback_infinte (TestCallbackUserData callback,
                        gpointer user_data)
 {
   infinite_callbacks = g_slist_prepend(infinite_callbacks, callback);
-  
+
   return callback(user_data);
 }
 
diff --git a/tests/everything/everything.h b/gir/everything.h
similarity index 100%
rename from tests/everything/everything.h
rename to gir/everything.h
diff --git a/tests/Makefile.am b/tests/Makefile.am
index bdaaa33..80c2094 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1 +1 @@
-SUBDIRS = . scanner everything repository invoke offsets
+SUBDIRS = . scanner repository invoke offsets
diff --git a/tests/everything/Makefile.am b/tests/everything/Makefile.am
deleted file mode 100644
index 4f21112..0000000
--- a/tests/everything/Makefile.am
+++ /dev/null
@@ -1,56 +0,0 @@
-include $(top_srcdir)/common.mk
-
-LT_CURRENT = 1
-LT_REVISION = 0
-LT_AGE = 0
-LT_VERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
-TYPELIB_VERSION = $(LT_CURRENT).0
-
-AM_CFLAGS = $(GOBJECT_CFLAGS)
-AM_LDFLAGS = -version-info $(LT_VERSION)
-LIBS = $(GOBJECT_LIBS)
-
-typelibsdir = $(libdir)/girepository-1.0
-typelibs_DATA = $(TYPELIBS)
-
-girsdir = $(datadir)/gir-1.0
-girs_DATA = $(GIRS)
-
-lib_LTLIBRARIES = libgirepository-everything-1.0.la
-
-libgirepository_everything_1_0_la_SOURCES = $(srcdir)/everything.c $(srcdir)/everything.h
-
-if OS_WIN32
-AM_LDFLAGS += -no-undefined
-endif
-
-GIRS =
-CHECKGIRS = $(GIRS:.gir=.gir.check)
-EXPECTEDGIRS = $(GIRS:.gir=-expected.gir)
-TYPELIBS = $(GIRS:.gir=.typelib)
-TXMLS = $(GIRS:.gir=.tgir)
-CLEANFILES = $(TYPELIBS) $(TXMLS) $(GIRS)
-BUILT_SOURCES = $(TYPELIBS) $(TXMLS) $(GIRS)
-EXTRA_DIST = $(EXPECTEDGIRS)
-
-Everything-$(TYPELIB_VERSION).gir: libgirepository-everything-1.0.la everything.c everything.h $(SCANNER_BIN) $(SCANNER_LIBS)
-	$(CHECK_DEBUG) $(SCANNER) \
-	--include=GObject-2.0 \
-        --libtool="$(SHAVE_SAVED_LIBTOOL)" \
-	--library=girepository-everything-1.0 \
-	--namespace=Everything --nsversion=$(TYPELIB_VERSION) \
-	--pkg gobject-2.0 \
-	$(srcdir)/everything.h $(srcdir)/everything.c \
-	--output $@
-GIRS += Everything-$(TYPELIB_VERSION).gir
-
-%.typelib: %.gir $(top_builddir)/tools/g-ir-compiler$(EXEEXT) Makefile
-	LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}:$(top_builddir)/girepository/.libs $(top_builddir)/tools/g-ir-compiler --includedir=. --includedir=$(top_builddir)/gir $< -o $@
-
-%.tgir: %.typelib $(top_builddir)/tools/g-ir-generate$(EXEEXT) Makefile
-	LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}:$(top_builddir)/girepository/.libs $(top_builddir)/tools/g-ir-generate --includedir=. --includedir=$(top_builddir)/gir $< -o $@
-
-%.gir.check: %.gir
-	@diff -u -U 10 $(srcdir)/$*-expected.gir $*.gir && echo "  TEST  $*.gir"
-
-check-local: $(CHECKGIRS)



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