From 725e98ffa810d04baf38e5d5d3f62091334b0888 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 15 Apr 2009 21:29:09 +0100 Subject: [PATCH] add --with-dbus-binding-tool option to use an external dbus-binding-tool Cross compilation fix. dbus-binding-tool needs to run on the host, but gets compiled for the target. Add an option to use an external program (host version) instead, similar to the --with-introspect-xml option. Signed-off-by: Peter Korsgaard Signed-off-by: Robert Schwebel --- configure.ac | 5 +++++ dbus/examples/Makefile.am | 4 ++-- dbus/examples/statemachine/Makefile.am | 4 ++-- test/core/Makefile.am | 6 +++--- test/interfaces/Makefile.am | 12 ++++++------ tools/Makefile.am | 2 +- 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index 621a4ff..982d6ee 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,11 @@ if test x$enable_verbose_mode = xyes; then AC_DEFINE(DBUS_ENABLE_VERBOSE_MODE,1,[Support a verbose mode]) fi +AC_ARG_WITH(dbus-binding-tool, + AS_HELP_STRING([--with-dbus-binding-tool=[filename]],[Use external dbus-binding-tool program]), + [DBUS_BINDING_TOOL=$withval],[DBUS_BINDING_TOOL=\$\(top_builddir\)/dbus/dbus-binding-tool]) +AC_SUBST(DBUS_BINDING_TOOL) + dnl DBUS_BUILD_TESTS controls unit tests built in to .c files dnl and also some stuff in the test/ subdir diff --git a/dbus/examples/Makefile.am b/dbus/examples/Makefile.am index bd53ecc..9178804 100644 --- a/dbus/examples/Makefile.am +++ b/dbus/examples/Makefile.am @@ -21,7 +21,7 @@ example_service_LDADD= $(top_builddir)/dbus/libdbus-glib-1.la BUILT_SOURCES = example-service-glue.h example-service-glue.h: example-service.xml - $(LIBTOOL) --mode=execute $(top_builddir)/dbus/dbus-binding-tool --prefix=some_object --mode=glib-server --output=example-service-glue.h $(srcdir)/example-service.xml + $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) --prefix=some_object --mode=glib-server --output=example-service-glue.h $(srcdir)/example-service.xml ## Makefile.am bits for another client/server pair @@ -37,7 +37,7 @@ example_signal_emitter_LDADD= $(top_builddir)/dbus/libdbus-glib-1.la BUILT_SOURCES += example-signal-emitter-glue.h example-signal-emitter-glue.h: example-signal-emitter.xml - $(LIBTOOL) --mode=execute $(top_builddir)/dbus/dbus-binding-tool --prefix=test_object --mode=glib-server --output=example-signal-emitter-glue.h $(srcdir)/example-signal-emitter.xml + $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) --prefix=test_object --mode=glib-server --output=example-signal-emitter-glue.h $(srcdir)/example-signal-emitter.xml CLEANFILES = $(BUILT_SOURCES) diff --git a/dbus/examples/statemachine/Makefile.am b/dbus/examples/statemachine/Makefile.am index c78af6c..37f0b30 100644 --- a/dbus/examples/statemachine/Makefile.am +++ b/dbus/examples/statemachine/Makefile.am @@ -26,10 +26,10 @@ statemachine_server_LDADD= $(top_builddir)/dbus/libdbus-glib-1.la BUILT_SOURCES = statemachine-server-glue.h statemachine-glue.h statemachine-server-glue.h: statemachine-server.xml - $(LIBTOOL) --mode=execute $(top_builddir)/dbus/dbus-binding-tool --prefix=sm_server --mode=glib-server --output=$@ $< + $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) --prefix=sm_server --mode=glib-server --output=$@ $< statemachine-glue.h: statemachine.xml - $(LIBTOOL) --mode=execute $(top_builddir)/dbus/dbus-binding-tool --prefix=sm_object --mode=glib-server --output=$@ $< + $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) --prefix=sm_object --mode=glib-server --output=$@ $< sm-marshal.c: Makefile sm-marshal.list @GLIB_GENMARSHAL@ --prefix=sm_marshal $(srcdir)/sm-marshal.list --header --body > $@.tmp && mv $@.tmp $@ diff --git a/test/core/Makefile.am b/test/core/Makefile.am index c70f64c..92edefb 100644 --- a/test/core/Makefile.am +++ b/test/core/Makefile.am @@ -63,13 +63,13 @@ test_service_glib_SOURCES= \ test_service_glib_LDADD= $(top_builddir)/dbus/libdbus-glib-1.la $(DBUS_GLIB_THREADS_LIBS) test-service-glib-glue.h: test-service-glib.xml $(top_builddir)/dbus/dbus-binding-tool - $(DEBUG) $(top_builddir)/dbus/dbus-binding-tool --prefix=my_object --mode=glib-server --output=test-service-glib-glue.h $(srcdir)/test-service-glib.xml + $(DEBUG) $(DBUS_BINDING_TOOL) --prefix=my_object --mode=glib-server --output=test-service-glib-glue.h $(srcdir)/test-service-glib.xml test-service-glib-subclass-glue.h: test-service-glib-subclass.xml $(top_builddir)/dbus/dbus-binding-tool - $(DEBUG) $(top_builddir)/dbus/dbus-binding-tool --prefix=my_object_subclass --mode=glib-server --output=test-service-glib-subclass-glue.h $(srcdir)/test-service-glib-subclass.xml + $(DEBUG) $(DBUS_BINDING_TOOL) --prefix=my_object_subclass --mode=glib-server --output=test-service-glib-subclass-glue.h $(srcdir)/test-service-glib-subclass.xml test-service-glib-bindings.h: test-service-glib.xml $(top_builddir)/dbus/dbus-binding-tool - $(DEBUG) $(top_builddir)/dbus/dbus-binding-tool --prefix=my_object --mode=glib-client --output=test-service-glib-bindings.h $(srcdir)/test-service-glib.xml + $(DEBUG) $(DBUS_BINDING_TOOL) --prefix=my_object --mode=glib-client --output=test-service-glib-bindings.h $(srcdir)/test-service-glib.xml my-object-marshal.c: Makefile my-object-marshal.list @GLIB_GENMARSHAL@ --prefix=my_object_marshal $(srcdir)/my-object-marshal.list --header --body > my-object-marshal.c diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am index 6081eac..3da3f46 100644 --- a/test/interfaces/Makefile.am +++ b/test/interfaces/Makefile.am @@ -47,22 +47,22 @@ BUILT_SOURCES = \ test-goodbye-bindings.h test-song-glue.h: test-song.xml $(top_builddir)/dbus/dbus-binding-tool - $(top_builddir)/dbus/dbus-binding-tool --prefix=test_song --mode=glib-server --output=test-song-glue.h $(srcdir)/test-song.xml + $(DBUS_BINDING_TOOL) --prefix=test_song --mode=glib-server --output=test-song-glue.h $(srcdir)/test-song.xml test-song-bindings.h: test-song.xml $(top_builddir)/dbus/dbus-binding-tool - $(top_builddir)/dbus/dbus-binding-tool --prefix=test_song --mode=glib-client --output=test-song-bindings.h $(srcdir)/test-song.xml + $(DBUS_BINDING_TOOL) --prefix=test_song --mode=glib-client --output=test-song-bindings.h $(srcdir)/test-song.xml test-hello-glue.h: test-hello.xml $(top_builddir)/dbus/dbus-binding-tool - $(top_builddir)/dbus/dbus-binding-tool --prefix=test_hello --mode=glib-server --output=test-hello-glue.h $(srcdir)/test-hello.xml + $(DBUS_BINDING_TOOL) --prefix=test_hello --mode=glib-server --output=test-hello-glue.h $(srcdir)/test-hello.xml test-hello-bindings.h: test-hello.xml $(top_builddir)/dbus/dbus-binding-tool - $(top_builddir)/dbus/dbus-binding-tool --prefix=test_hello --mode=glib-client --output=test-hello-bindings.h $(srcdir)/test-hello.xml + $(DBUS_BINDING_TOOL) --prefix=test_hello --mode=glib-client --output=test-hello-bindings.h $(srcdir)/test-hello.xml test-goodbye-glue.h: test-goodbye.xml $(top_builddir)/dbus/dbus-binding-tool - $(top_builddir)/dbus/dbus-binding-tool --prefix=test_goodbye --mode=glib-server --output=test-goodbye-glue.h $(srcdir)/test-goodbye.xml + $(DBUS_BINDING_TOOL) --prefix=test_goodbye --mode=glib-server --output=test-goodbye-glue.h $(srcdir)/test-goodbye.xml test-goodbye-bindings.h: test-goodbye.xml $(top_builddir)/dbus/dbus-binding-tool - $(top_builddir)/dbus/dbus-binding-tool --prefix=test_goodbye --mode=glib-client --output=test-goodbye-bindings.h $(srcdir)/test-goodbye.xml + $(DBUS_BINDING_TOOL) --prefix=test_goodbye --mode=glib-client --output=test-goodbye-bindings.h $(srcdir)/test-goodbye.xml CLEANFILES = \ diff --git a/tools/Makefile.am b/tools/Makefile.am index 9971a19..d6dcbac 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -4,7 +4,7 @@ nodist_libdbus_glib_HEADERS = dbus-glib-bindings.h libdbus_glibdir = $(includedir)/dbus-1.0/dbus dbus-glib-bindings.h: dbus-bus-introspect.xml $(top_builddir)/dbus/dbus-binding-tool$(EXEEXT) - $(top_builddir)/dbus/dbus-binding-tool --mode=glib-client --prefix=dbus_bus --output=dbus-glib-bindings.h dbus-bus-introspect.xml + $(DBUS_BINDING_TOOL) --mode=glib-client --prefix=dbus_bus --output=dbus-glib-bindings.h dbus-bus-introspect.xml BUILT_SOURCES = dbus-glib-bindings.h dbus-bus-introspect.xml -- 1.6.2.4