* [PATCH] libtraceevent: Allow the pkg-config libs and cflags prefix to be overwritten
@ 2020-12-16 20:00 Steven Rostedt
0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2020-12-16 20:00 UTC (permalink / raw)
To: Linux Trace Devel
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
In case libtracefs needs to be built in a destination directory where
libtraceevent will be located, and not on the host machine, it will need a
way to override the location of the include and library directories.
Facilitate this by having them use the ${prefix} variable.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
Makefile | 8 ++++----
libtraceevent.pc.template | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index f96232b..5bd3253 100644
--- a/Makefile
+++ b/Makefile
@@ -50,8 +50,8 @@ man_dir = $(prefix)/share/man
man_dir_SQ = '$(subst ','\'',$(man_dir))'
pkgconfig_dir ?= $(word 1,$(shell $(PKG_CONFIG) \
--variable pc_path pkg-config | tr ":" " "))
-includedir_relative = traceevent
-includedir = $(prefix)/include/$(includedir_relative)
+includedir_relative = include/traceevent
+includedir = $(prefix)/$(includedir_relative)
includedir_SQ = '$(subst ','\'',$(includedir))'
export man_dir man_dir_SQ INSTALL
@@ -243,8 +243,8 @@ define do_make_pkgconfig_file
cp -f ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE}; \
sed -i "s|INSTALL_PREFIX|${1}|g" ${PKG_CONFIG_FILE}; \
sed -i "s|LIB_VERSION|${EVENT_PARSE_VERSION}|g" ${PKG_CONFIG_FILE}; \
- sed -i "s|LIB_DIR|${libdir}|g" ${PKG_CONFIG_FILE}; \
- sed -i "s|HEADER_DIR|$(includedir)|g" ${PKG_CONFIG_FILE};
+ sed -i "s|LIB_DIR|${libdir_relative}|g" ${PKG_CONFIG_FILE}; \
+ sed -i "s|HEADER_DIR|$(includedir_relative)|g" ${PKG_CONFIG_FILE};
endef
$(PKG_CONFIG_FILE) : ${PKG_CONFIG_SOURCE_FILE}.template $(BUILD_PREFIX)
diff --git a/libtraceevent.pc.template b/libtraceevent.pc.template
index d558377..1ab046f 100644
--- a/libtraceevent.pc.template
+++ b/libtraceevent.pc.template
@@ -1,6 +1,6 @@
prefix=INSTALL_PREFIX
-libdir=LIB_DIR
-includedir=HEADER_DIR
+libdir=${prefix}/LIB_DIR
+includedir=${prefix}/HEADER_DIR
Name: libtraceevent
URL: https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
--
2.25.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-16 20:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 20:00 [PATCH] libtraceevent: Allow the pkg-config libs and cflags prefix to be overwritten Steven Rostedt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.