[PATCH] Fix some build paths in module Makefiles

Tim Bird <[email protected]>
Newsgroups gmane.linux.kernel.tracing
Message-ID <[email protected]>
I recently checked out a later version of the viewer, and found
a couple of build paths that cause problems with builds done outside
the source directory.

Here's a patch:  (You can ignore the version numbers in the patch,
this applies OK against 0.8.79)

I patched both the Makefile.am and Makefile.in files, but obviously
if you re-gen the Makefile.in, that part of the patch is redundant.

The change is straightforward - it just uses top_builddir
in place of top_srcdir for the library path for linking.
When building within the source tree, top_builddir is the
same as top_srcdir, so this should have no effect for
people doing builds the "normal" way.

 lttv/modules/gui/tutorial/Makefile.am |    2 +-
 lttv/modules/gui/tutorial/Makefile.in |    2 +-
 lttv/modules/text/Makefile.am         |    2 +-
 lttv/modules/text/Makefile.in         |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

<Signed-off-by: Tim Bird tim.bird (at) am.sony.com>

----------
diff -u -X /home/tbird/dontdiff -pruN LinuxTraceToolkitViewer-0.8.51-11072006.orig/lttv/modules/gui/tutorial/Makefile.am LinuxTraceToolkitViewer-0.8.51-11072006/lttv/modules/gui/tutorial/Makefile.am
--- LinuxTraceToolkitViewer-0.8.51-11072006.orig/lttv/modules/gui/tutorial/Makefile.am	2006-06-17 15:02:46.000000000 -0700
+++ LinuxTraceToolkitViewer-0.8.51-11072006/lttv/modules/gui/tutorial/Makefile.am	2007-03-13 17:20:02.000000000 -0700
@@ -26,7 +26,7 @@
 AM_CFLAGS = $(GLIB_CFLAGS)
 AM_CFLAGS += $(GTK_CFLAGS)
 LIBS += $(GLIB_LIBS)
-LIBS += $(GTK_LIBS) -L${top_srcdir}/lttv/modules/gui/lttvwindow/lttvwindow -llttvwindow
+LIBS += $(GTK_LIBS) -L${top_builddir}/lttv/modules/gui/lttvwindow/lttvwindow -llttvwindow

 libdir = ${lttvplugindir}

diff -u -X /home/tbird/dontdiff -pruN LinuxTraceToolkitViewer-0.8.51-11072006.orig/lttv/modules/gui/tutorial/Makefile.in LinuxTraceToolkitViewer-0.8.51-11072006/lttv/modules/gui/tutorial/Makefile.in
--- LinuxTraceToolkitViewer-0.8.51-11072006.orig/lttv/modules/gui/tutorial/Makefile.in	2006-07-11 19:48:05.000000000 -0700
+++ LinuxTraceToolkitViewer-0.8.51-11072006/lttv/modules/gui/tutorial/Makefile.in	2007-03-13 17:20:19.000000000 -0700
@@ -103,7 +103,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@ $(GLIB_LIBS) $(GTK_LIBS) -L${top_srcdir}/lttv/modules/gui/lttvwindow/lttvwindow -llttvwindow
+LIBS = @LIBS@ $(GLIB_LIBS) $(GTK_LIBS) -L${top_builddir}/lttv/modules/gui/lttvwindow/lttvwindow -llttvwindow
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
diff -u -X /home/tbird/dontdiff -pruN LinuxTraceToolkitViewer-0.8.51-11072006.orig/lttv/modules/text/Makefile.am LinuxTraceToolkitViewer-0.8.51-11072006/lttv/modules/text/Makefile.am
--- LinuxTraceToolkitViewer-0.8.51-11072006.orig/lttv/modules/text/Makefile.am	2006-06-25 14:45:19.000000000 -0700
+++ LinuxTraceToolkitViewer-0.8.51-11072006/lttv/modules/text/Makefile.am	2007-03-13 17:17:26.000000000 -0700
@@ -1,5 +1,5 @@
 AM_CFLAGS = $(GLIB_CFLAGS)
-LIBS += $(GLIB_LIBS) -lgobject-2.0 -L${top_srcdir}/ltt -llttvtraceread
+LIBS += $(GLIB_LIBS) -lgobject-2.0 -L${top_builddir}/ltt -llttvtraceread

 libdir = ${lttvplugindir}

diff -u -X /home/tbird/dontdiff -pruN LinuxTraceToolkitViewer-0.8.51-11072006.orig/lttv/modules/text/Makefile.in LinuxTraceToolkitViewer-0.8.51-11072006/lttv/modules/text/Makefile.in
--- LinuxTraceToolkitViewer-0.8.51-11072006.orig/lttv/modules/text/Makefile.in	2006-07-11 19:47:53.000000000 -0700
+++ LinuxTraceToolkitViewer-0.8.51-11072006/lttv/modules/text/Makefile.in	2007-03-13 17:17:39.000000000 -0700
@@ -80,7 +80,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@ $(GLIB_LIBS) -lgobject-2.0 -L${top_srcdir}/ltt -llttvtraceread
+LIBS = @LIBS@ $(GLIB_LIBS) -lgobject-2.0 -L${top_builddir}/ltt -llttvtraceread
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.