From 06279f50e924d1d55b43eb3b299f6633ecb1f7a4 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Wed, 22 Sep 2021 16:33:10 +0800
Subject: [PATCH] Makefile.am: update rpath link

since commit 6339062 Move liblttng-ust to 'src/lib/',
liblttng-ust.so/liblttng-ust-common.so/liblttng-ust-tracepoint.so
's location changed from one dir to multiple dirs. which make below
error:
ld: warning: liblttng-ust-common.so.1, needed by ../../../src/lib/lttng-ust/.libs/liblttng-ust.so, not found (try using -rpath or -rpath-link)
ld: warning: liblttng-ust-tracepoint.so.1, needed by ../../../src/lib/lttng-ust/.libs/liblttng-ust.so, not found (try using -rpath or -rpath-link)

Upstream-Status: Submitted [https://github.com/lttng/lttng-ust/pull/61]

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 doc/examples/Makefile.am | 2 +-
 1 file changed, 1 insertions(+), 1 deletions(-)

diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index 8ee0564..20d246c 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -142,7 +142,7 @@ all-local:
 				CFLAGS='$(CFLAGS)' \
 				AM_CFLAGS='$(AM_CFLAGS)' \
 				LDFLAGS="$(LDFLAGS)" \
-				AM_LDFLAGS='$(AM_LDFLAGS) -L../../../src/lib/lttng-ust/.libs -Wl,-rpath="$(PWD)/../../src/lib/lttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../src/lib/lttng-ust/.libs/"' \
+				AM_LDFLAGS='$(AM_LDFLAGS) -L../../../src/lib/lttng-ust/.libs -Wl,-rpath="$(PWD)/../../src/lib/lttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../src/lib/lttng-ust/.libs/:$(PWD)/../../src/lib/lttng-ust-tracepoint/.libs:$(PWD)/../../src/lib/lttng-ust-common/.libs/"' \
 				LTTNG_GEN_TP_PATH="$$rel_src_subdir$(top_srcdir)/tools/" \
 				AM_V_P="$(AM_V_P)" \
 				AM_V_at="$(AM_V_at)" \
-- 
2.17.1

