Commit 39f0ae61 authored by Yann E. MORIN's avatar Yann E. MORIN Committed by Simon McVittie
Browse files

buildsys: use variable for glib-genmarshal

When doing cross-compilation, the path returned by pkg-config for
glib-genmarshal can be incorrect (because it is the runtime path,
not the build-time path).

Change to use pkg-config to get the variable.

This allows overridig the path at configure time, by using the configure
option GLIB_GENMARSHAL=/path/toglib-genmarshal

Signed-off-by: Yann E. MORIN's avatar"Yann E. MORIN" <>
[smcv: Fix typo in commit message]
Reviewed-by: Simon McVittie's avatarSimon McVittie <>
parent 73e32f5a
......@@ -267,8 +267,8 @@ AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_32],
[Warn on use of APIs deprecated before GLib 2.32])
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.40, gobject-2.0 >= 2.40, gio-2.0 >= 2.40])
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
PKG_CHECK_VAR([GLIB_GENMARSHAL], [glib-2.0], [glib_genmarshal],,
[AC_MSG_ERROR([cannot find glib-genmarshal])])
dnl GLib flags
......@@ -87,10 +87,10 @@ dbus_binding_tool_LDADD= $(builddir)/ $(builddir)/libdbus-glib-1
## we just rebuilt these manually and check them into cvs; easier than
## convincing automake/make to do this properly
@GLIB_GENMARSHAL@ --prefix=_dbus_g_marshal dbus-gmarshal.list --header > dbus-gmarshal.h && \
$(GLIB_GENMARSHAL) --prefix=_dbus_g_marshal dbus-gmarshal.list --header > dbus-gmarshal.h && \
echo '#include <config.h>' > dbus-gmarshal.c && \
echo '#include "dbus-gmarshal.h"' >> dbus-gmarshal.c && \
@GLIB_GENMARSHAL@ --prefix=_dbus_g_marshal dbus-gmarshal.list --body >> dbus-gmarshal.c
$(GLIB_GENMARSHAL) --prefix=_dbus_g_marshal dbus-gmarshal.list --body >> dbus-gmarshal.c
completiondir = $(sysconfdir)/bash_completion.d
......@@ -35,11 +35,11 @@ statemachine-glue.h: statemachine.xml
sm-marshal.c: Makefile sm-marshal.list
echo "#include <config.h>" > $@.tmp
@GLIB_GENMARSHAL@ --prefix=sm_marshal $(srcdir)/sm-marshal.list --header --body >> $@.tmp
$(GLIB_GENMARSHAL) --prefix=sm_marshal $(srcdir)/sm-marshal.list --header --body >> $@.tmp
mv $@.tmp $@
sm-marshal.h: Makefile sm-marshal.list
@GLIB_GENMARSHAL@ --prefix=sm_marshal $(srcdir)/sm-marshal.list --header > $@.tmp && mv $@.tmp $@
$(GLIB_GENMARSHAL) --prefix=sm_marshal $(srcdir)/sm-marshal.list --header > $@.tmp && mv $@.tmp $@
BUILT_SOURCES += sm-marshal.c sm-marshal.h
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment