Re-enable signal tests when cross-compiling

The glib-genmarshal tool has been rewritten in Python, which means we
can run it when cross-compiling.

https://bugzilla.gnome.org/show_bug.cgi?id=784528
This commit is contained in:
Emmanuele Bassi 2017-07-05 17:10:08 +01:00
parent 93f16a45ab
commit f7643a7df7

View File

@ -35,8 +35,7 @@ ifaceproperties_SOURCES = ifaceproperties.c testcommon.h
# The marshalers test requires running a binary, so we cannot build it when # The marshalers test requires running a binary, so we cannot build it when
# cross-compiling # cross-compiling
if !CROSS_COMPILING glib_genmarshal = $(top_builddir)/gobject/glib-genmarshal
glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal
test_programs += signals test_programs += signals
signals_SOURCES = signals.c signals_SOURCES = signals.c
@ -45,10 +44,21 @@ signals.o: marshalers.h
CLEANFILES += marshalers.h marshalers.c CLEANFILES += marshalers.h marshalers.c
EXTRA_DIST += marshalers.list EXTRA_DIST += marshalers.list
marshalers.h: Makefile.am marshalers.list marshalers.h: $(srcdir)/marshalers.list Makefile.am
$(AM_V_GEN) $(glib_genmarshal) --prefix=test $(srcdir)/marshalers.list --header --valist-marshallers > marshalers.h $(AM_V_GEN) $(glib_genmarshal) \
--prefix=test \
--valist-marshallers \
--output=$@ \
--quiet \
--header \
$<
marshalers.c: Makefile.am marshalers.h marshalers.list marshalers.c: $(srcdir)/marshalers.list marshalers.h Makefile.am
$(AM_V_GEN) (echo "#include \"marshalers.h\""; $(glib_genmarshal) --prefix=test $(srcdir)/marshalers.list --body --valist-marshallers) > $@.tmp && mv $@.tmp $@ $(AM_V_GEN) $(glib_genmarshal) \
--prefix=test \
endif # !CROSS_COMPILING --valist-marshallers \
--include-header=marshalers.h \
--output=$@ \
--quiet \
--body \
$<