From b0837419c0cff6262af76363f54ad394eeb9d041 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 14 Nov 2008 21:25:58 +0000 Subject: [PATCH] Use new --program arg from g-i, clean up build accordingly * configure.ac: Look for paths to all the g-i tools, and also get the full path to metacity * src/Makefile.am: Remove noinst library, not necessary now svn path=/trunk/; revision=45 --- configure.ac | 13 +++++++++++++ src/Makefile.am | 24 ++++-------------------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/configure.ac b/configure.ac index f68801c2d..1fdbea722 100644 --- a/configure.ac +++ b/configure.ac @@ -21,6 +21,16 @@ PKG_CHECK_MODULES(TRAY, gtk+-2.0) # Sets GLIB_GENMARSHAL and GLIB_MKENUMS AM_PATH_GLIB_2_0() +G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` +AC_SUBST(G_IR_SCANNER) +G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` +AC_SUBST(G_IR_COMPILER) +G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` +AC_SUBST(G_IR_GENERATE) +GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` +AC_SUBST(GIRDIR) +TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" +AC_SUBST(TYPELIBDIR) changequote(,)dnl if test "x$GCC" = "xyes"; then @@ -36,6 +46,9 @@ if test "x$GCC" = "xyes"; then fi changequote([,])dnl +AC_PATH_PROG(metacity, [metacity]) +AC_SUBST(metacity) + AC_OUTPUT([ Makefile src/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index df66f7349..63bc4e88b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -29,36 +29,20 @@ libgnome_shell_la_LIBADD = \ libtray.la libgnome_shell_la_CPPFLAGS = $(gnome_shell_cflags) -# We can't have any undefined symbols when g-ir-scanner dlopens the library -# to introspect it, so we link everything a _second_ time, including a -# stub file that just defines all the symbols that we use from metacity -noinst_LTLIBRARIES = libgnome-shell-introspect.la - -libgnome_shell_introspect_la_SOURCES = \ - $(libgnome_shell_la_SOURCES) \ - metacity-symbols.c -# The dummy -rpath here is needed to convince libtool to build a -# noinst_LTLIBRARY shared -libgnome_shell_introspect_la_LDFLAGS = -avoid-version -module -rpath $(libdir) -libgnome_shell_introspect_la_LIBADD = \ - $(MUTTER_PLUGIN_LIBS) \ - libtidy-1.0.la \ - libtray.la -libgnome_shell_introspect_la_CPPFLAGS = $(gnome_shell_cflags) - typelibdir = $(pkglibdir)/girepository typelib_DATA = Shell-0.1.typelib Tidy-1.0.typelib # After we run g-ir-scanner, we need to change the library name written in # the .gir file from the "fake" second copy of the library to the real name -Shell-0.1.gir: libgnome-shell-introspect.la $(libgnome_shell_la_SOURCES) Makefile - g-ir-scanner \ +Shell-0.1.gir: $(metacity) $(G_IR_SCANNER) libgnome-shell-introspect.la $(libgnome_shell_la_SOURCES) Makefile + $(G_IR_SCANNER) \ --namespace=Shell \ --nsversion=0.1 \ --include=GObject-2.0 \ --include=Clutter-0.8 \ --include=Meta-2.25 \ - --library=gnome-shell-introspect \ + --program=metacity \ + --program-arg=--mutter-plugins=$$(pwd)/libgnome-shell.la \ $(libgnome_shell_la_SOURCES) \ $(libgnome_shell_la_CPPFLAGS) \ -o $@.tmp