From 74130cb7d45f2c698c1a9f224bf8e7a2f2368f18 Mon Sep 17 00:00:00 2001 From: Paul Chavent Date: Tue, 2 Oct 2012 16:42:16 -0400 Subject: [PATCH] Fix: Build out of src tree Signed-off-by: David Goulet --- src/bin/lttng-consumerd/Makefile.am | 2 +- src/bin/lttng-relayd/Makefile.am | 3 ++- src/bin/lttng-sessiond/Makefile.am | 3 ++- src/bin/lttng/Makefile.am | 3 ++- src/common/Makefile.am | 2 +- src/common/compat/Makefile.am | 2 +- src/common/hashtable/Makefile.am | 2 +- src/common/kernel-consumer/Makefile.am | 2 ++ src/common/kernel-ctl/Makefile.am | 2 +- src/common/relayd/Makefile.am | 2 ++ src/common/sessiond-comm/Makefile.am | 2 ++ src/common/ust-consumer/Makefile.am | 3 +++ src/lib/lttng-ctl/Makefile.am | 2 ++ src/lib/lttng-ctl/filter/Makefile.am | 3 +++ tests/kernel/Makefile.am | 2 +- tests/tools/Makefile.am | 2 +- tests/tools/streaming/Makefile.am | 2 +- tests/ust/Makefile.am | 2 +- tests/ust/before-after/Makefile.am | 2 +- tests/ust/high-throughput/Makefile.am | 2 +- tests/ust/low-throughput/Makefile.am | 2 +- tests/ust/multi-session/Makefile.am | 2 +- tests/ust/nprocesses/Makefile.am | 2 +- 23 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/bin/lttng-consumerd/Makefile.am b/src/bin/lttng-consumerd/Makefile.am index 89ae05958..a395c0b37 100644 --- a/src/bin/lttng-consumerd/Makefile.am +++ b/src/bin/lttng-consumerd/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src lttnglibexec_PROGRAMS = lttng-consumerd diff --git a/src/bin/lttng-relayd/Makefile.am b/src/bin/lttng-relayd/Makefile.am index cb625e5c1..a04b910f6 100644 --- a/src/bin/lttng-relayd/Makefile.am +++ b/src/bin/lttng-relayd/Makefile.am @@ -1,4 +1,5 @@ -AM_CPPFLAGS = -DINSTALL_BIN_PATH=\""$(lttnglibexecdir)"\" \ +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src \ + -DINSTALL_BIN_PATH=\""$(lttnglibexecdir)"\" \ -DINSTALL_LIB_PATH=\""$(libdir)"\" AM_CFLAGS = -fno-strict-aliasing diff --git a/src/bin/lttng-sessiond/Makefile.am b/src/bin/lttng-sessiond/Makefile.am index b13059d77..9b9a6c81b 100644 --- a/src/bin/lttng-sessiond/Makefile.am +++ b/src/bin/lttng-sessiond/Makefile.am @@ -1,4 +1,5 @@ -AM_CPPFLAGS = -DINSTALL_BIN_PATH=\""$(lttnglibexecdir)"\" \ +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src \ + -DINSTALL_BIN_PATH=\""$(lttnglibexecdir)"\" \ -DINSTALL_LIB_PATH=\""$(libdir)"\" AM_CFLAGS = -fno-strict-aliasing diff --git a/src/bin/lttng/Makefile.am b/src/bin/lttng/Makefile.am index 0381aa656..21eebab7d 100644 --- a/src/bin/lttng/Makefile.am +++ b/src/bin/lttng/Makefile.am @@ -1,4 +1,5 @@ -AM_CPPFLAGS = -DINSTALL_BIN_PATH=\""$(bindir)"\" +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src \ + -DINSTALL_BIN_PATH=\""$(bindir)"\" bin_PROGRAMS = lttng diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 577dffe85..da65374db 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src SUBDIRS = compat hashtable kernel-ctl sessiond-comm relayd \ kernel-consumer ust-consumer testpoint diff --git a/src/common/compat/Makefile.am b/src/common/compat/Makefile.am index 91cd3bdcf..2d832822f 100644 --- a/src/common/compat/Makefile.am +++ b/src/common/compat/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src noinst_LTLIBRARIES = libcompat.la diff --git a/src/common/hashtable/Makefile.am b/src/common/hashtable/Makefile.am index 7a2b83517..62e22c117 100644 --- a/src/common/hashtable/Makefile.am +++ b/src/common/hashtable/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src noinst_LTLIBRARIES = libhashtable.la diff --git a/src/common/kernel-consumer/Makefile.am b/src/common/kernel-consumer/Makefile.am index 008041e1d..ed5462a65 100644 --- a/src/common/kernel-consumer/Makefile.am +++ b/src/common/kernel-consumer/Makefile.am @@ -1,3 +1,5 @@ +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src + # Kernel consumer library noinst_LTLIBRARIES = libkernel-consumer.la diff --git a/src/common/kernel-ctl/Makefile.am b/src/common/kernel-ctl/Makefile.am index a56a0218b..ab057dd36 100644 --- a/src/common/kernel-ctl/Makefile.am +++ b/src/common/kernel-ctl/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src noinst_LTLIBRARIES = libkernel-ctl.la diff --git a/src/common/relayd/Makefile.am b/src/common/relayd/Makefile.am index 84eee1b8e..274da87be 100644 --- a/src/common/relayd/Makefile.am +++ b/src/common/relayd/Makefile.am @@ -1,3 +1,5 @@ +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src + # Relayd library noinst_LTLIBRARIES = librelayd.la diff --git a/src/common/sessiond-comm/Makefile.am b/src/common/sessiond-comm/Makefile.am index 2a70d54ce..24063f862 100644 --- a/src/common/sessiond-comm/Makefile.am +++ b/src/common/sessiond-comm/Makefile.am @@ -1,3 +1,5 @@ +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src + # Session daemon communication lib noinst_LTLIBRARIES = libsessiond-comm.la diff --git a/src/common/ust-consumer/Makefile.am b/src/common/ust-consumer/Makefile.am index c79c4a55e..ab8d38add 100644 --- a/src/common/ust-consumer/Makefile.am +++ b/src/common/ust-consumer/Makefile.am @@ -1,4 +1,7 @@ if HAVE_LIBLTTNG_UST_CTL + +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src + noinst_LTLIBRARIES = libust-consumer.la libust_consumer_la_SOURCES = ust-consumer.c ust-consumer.h diff --git a/src/lib/lttng-ctl/Makefile.am b/src/lib/lttng-ctl/Makefile.am index f1b4b500c..2681bddb2 100644 --- a/src/lib/lttng-ctl/Makefile.am +++ b/src/lib/lttng-ctl/Makefile.am @@ -1,3 +1,5 @@ +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(builddir) + SUBDIRS = filter lib_LTLIBRARIES = liblttng-ctl.la diff --git a/src/lib/lttng-ctl/filter/Makefile.am b/src/lib/lttng-ctl/filter/Makefile.am index 45ed418eb..85a427447 100644 --- a/src/lib/lttng-ctl/filter/Makefile.am +++ b/src/lib/lttng-ctl/filter/Makefile.am @@ -1,3 +1,6 @@ +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src \ + -I$(srcdir) -I$(builddir) + noinst_PROGRAMS = filter-grammar-test noinst_LTLIBRARIES = libfilter.la noinst_HEADERS = filter-ast.h diff --git a/tests/kernel/Makefile.am b/tests/kernel/Makefile.am index 2992afbf5..8872af425 100644 --- a/tests/kernel/Makefile.am +++ b/tests/kernel/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = -g -Wall -I../ +AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests -g -Wall AM_LDFLAGS = -lurcu -lurcu-cds EXTRA_DIST = runall.sh run-kernel-tests.sh diff --git a/tests/tools/Makefile.am b/tests/tools/Makefile.am index faa836ca6..173dce21f 100644 --- a/tests/tools/Makefile.am +++ b/tests/tools/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS = streaming health -AM_CFLAGS = -g -Wall -I../ +AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests -g -Wall AM_LDFLAGS = -lurcu -lurcu-cds EXTRA_DIST = runall.sh diff --git a/tests/tools/streaming/Makefile.am b/tests/tools/streaming/Makefile.am index f7a3c9d75..3ff8ef0a1 100644 --- a/tests/tools/streaming/Makefile.am +++ b/tests/tools/streaming/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = -I. -O2 -g -I../../ +AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests -I$(srcdir) -O2 -g AM_LDFLAGS = if LTTNG_TOOLS_BUILD_WITH_LIBDL diff --git a/tests/ust/Makefile.am b/tests/ust/Makefile.am index 146bff250..387842d11 100644 --- a/tests/ust/Makefile.am +++ b/tests/ust/Makefile.am @@ -1,7 +1,7 @@ if HAVE_LIBLTTNG_UST_CTL SUBDIRS = nprocesses high-throughput low-throughput before-after multi-session -AM_CFLAGS = -g -Wall -I../ +AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/tests -I$(top_srcdir)/src -g -Wall AM_LDFLAGS = -lurcu -lurcu-cds EXTRA_DIST = runall.sh run-ust-global-tests.sh diff --git a/tests/ust/before-after/Makefile.am b/tests/ust/before-after/Makefile.am index 29652dcbb..d197d72f5 100644 --- a/tests/ust/before-after/Makefile.am +++ b/tests/ust/before-after/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = -I. -O2 +AM_CFLAGS = -I$(srcdir) -O2 AM_LDFLAGS = -llttng-ust if LTTNG_TOOLS_BUILD_WITH_LIBDL diff --git a/tests/ust/high-throughput/Makefile.am b/tests/ust/high-throughput/Makefile.am index 01d5ad28c..cff8fe423 100644 --- a/tests/ust/high-throughput/Makefile.am +++ b/tests/ust/high-throughput/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = -I. -O2 +AM_CFLAGS = -I$(srcdir) -O2 AM_LDFLAGS = -llttng-ust if LTTNG_TOOLS_BUILD_WITH_LIBDL diff --git a/tests/ust/low-throughput/Makefile.am b/tests/ust/low-throughput/Makefile.am index aefdf5318..a1df9f5e2 100644 --- a/tests/ust/low-throughput/Makefile.am +++ b/tests/ust/low-throughput/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = -I. -O2 +AM_CFLAGS = -I$(srcdir) -O2 AM_LDFLAGS = -llttng-ust if LTTNG_TOOLS_BUILD_WITH_LIBDL diff --git a/tests/ust/multi-session/Makefile.am b/tests/ust/multi-session/Makefile.am index 29652dcbb..d197d72f5 100644 --- a/tests/ust/multi-session/Makefile.am +++ b/tests/ust/multi-session/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = -I. -O2 +AM_CFLAGS = -I$(srcdir) -O2 AM_LDFLAGS = -llttng-ust if LTTNG_TOOLS_BUILD_WITH_LIBDL diff --git a/tests/ust/nprocesses/Makefile.am b/tests/ust/nprocesses/Makefile.am index d3fdcbd41..20beea0be 100644 --- a/tests/ust/nprocesses/Makefile.am +++ b/tests/ust/nprocesses/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = -I. -O2 +AM_CFLAGS = -I$(srcdir) -O2 AM_LDFLAGS = -llttng-ust if LTTNG_TOOLS_BUILD_WITH_LIBDL -- 2.34.1