* [PATCH] libtracefs: Fix the building dependencies for make install
@ 2020-12-10 16:24 Steven Rostedt
0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2020-12-10 16:24 UTC (permalink / raw)
To: Linux Trace Devel
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
While testing: make DESTDIR=/tmp/install/ O=/tmp/build/ install
I found that the dependencies of the install were not correct.
Add the libraries to the install path, and also fix the creation of the
directories itself.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
Makefile | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 02b3d25..035f4de 100644
--- a/Makefile
+++ b/Makefile
@@ -180,7 +180,7 @@ all_cmd: $(TARGETS) $(PKG_CONFIG_FILE)
libtracefs.a: $(LIBTRACEFS_STATIC)
libtracefs.so: $(LIBTRACEFS_SHARED)
-libs:
+libs: libtracefs.a libtracefs.so
test: force $(LIBTRACEFS_STATIC)
ifneq ($(CUNIT_INSTALLED),1)
@@ -204,6 +204,17 @@ endef
$(PKG_CONFIG_FILE) : ${PKG_CONFIG_SOURCE_FILE}.template
$(Q) $(call do_make_pkgconfig_file,$(prefix))
+define do_install_mkdir
+ if [ ! -d '$(DESTDIR_SQ)$1' ]; then \
+ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$1'; \
+ fi
+endef
+
+define do_install
+ $(call do_install_mkdir,$2); \
+ $(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2'
+endef
+
define do_install_pkgconfig_file
if [ -n "${pkgconfig_dir}" ]; then
\ $(call
do_install,$(PKG_CONFIG_FILE),$(pkgconfig_dir),644); \
--
2.25.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-10 16:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 16:24 [PATCH] libtracefs: Fix the building dependencies for make install 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.