diff options
author | Tommi Komulainen <tommi.komulainen@iki.fi> | 2008-10-15 22:18:37 +0000 |
---|---|---|
committer | Tommi Komulainen <tko@src.gnome.org> | 2008-10-15 22:18:37 +0000 |
commit | 12508a3bbb43422ffcb17457c87c5fdb079be8b2 (patch) | |
tree | 8a51b3fa5ca19d5d584bc7555b1f54760d4e80d7 /gir | |
parent | 5d618a4421a83234a7b29853a04647135731d296 (diff) | |
download | gobject-introspection-12508a3bbb43422ffcb17457c87c5fdb079be8b2.tar.gz |
check that typelib -> gir -> typelib transformation is lossless (it's not)
2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
* gir/Makefile.am (check-local): check that typelib -> gir -> typelib
transformation is lossless (it's not)
svn path=/trunk/; revision=720
Diffstat (limited to 'gir')
-rw-r--r-- | gir/Makefile.am | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gir/Makefile.am b/gir/Makefile.am index dbe52a9a..be69033c 100644 --- a/gir/Makefile.am +++ b/gir/Makefile.am @@ -117,3 +117,24 @@ dist_gir_DATA = $(BUILT_SOURCES) typelibsdir = $(datadir)/girepository typelibs_DATA = GLib-2.0.typelib GModule-2.0.typelib GObject-2.0.typelib Gio-2.0.typelib CLEANFILES += $(typelibs_DATA) + +# 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 +# semantically equivalent. + +%.test.gir: %.typelib $(top_builddir)/tools/g-ir-generate$(EXEEXT) Makefile + $(DEBUG) $(top_builddir)/tools/g-ir-generate$(EXEEXT) --includedir=. $< -o $@ + +testlib-%: %.test.gir $(top_builddir)/tools/g-ir-generate$(EXEEXT) Makefile + $(DEBUG) $(top_builddir)/tools/g-ir-compiler$(EXEEXT) --includedir=. $(G_IR_COMPILER_OPTS) $< -o $*.test.typelib + cmp $*.typelib $*.test.typelib && rm $*.test.typelib + +testgir-%: %.test.gir + diff -u $*.gir $< && rm $< + +CLEANFILES += $(typelibs_DATA:%.typelib=%.test.gir) +CLEANFILES += $(typelibs_DATA:%.typelib=%.test.typelib) + +check-local: $(typelibs_DATA:%.typelib=testlib-%) +check-gir: $(typelibs_DATA:%.typelib=testgir-%) |