summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJohn Kacur <jkacur@redhat.com>2022-04-29 19:28:11 +0300
committerSteven Rostedt (Google) <rostedt@goodmis.org>2022-05-26 22:18:28 +0300
commit39c3d84cb5b52792a7323a338334d8d65b2dbe3f (patch)
tree0c1532ed357b9deaff88f6fdf1201f17a31b6c59 /tools
parent2a6b52ed72c822b5ee146a6a00ea66614fe02653 (diff)
downloadlinux-39c3d84cb5b52792a7323a338334d8d65b2dbe3f.tar.xz
rtla: Don't overwrite existing directory mode
The mode on /usr/bin is often 555 these days, but make install on rtla overwrites this with 755 Fix this by preserving the current directory if it exists. Link: https://lkml.kernel.org/r/8c294a6961080a1970fd8b73f7bcf1e3984579e2.1651247710.git.bristot@kernel.org Link: https://lore.kernel.org/r/20220402043939.6962-1-jkacur@redhat.com Cc: Daniel Bristot de Oliveria <bristot@redhat.com> Fixes: 79ce8f43ac5a ("rtla: Real-Time Linux Analysis tool") Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org> Signed-off-by: John Kacur <jkacur@redhat.com> Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/tracing/rtla/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/tracing/rtla/Makefile b/tools/tracing/rtla/Makefile
index 86d1df3763ef..e28ae3f78264 100644
--- a/tools/tracing/rtla/Makefile
+++ b/tools/tracing/rtla/Makefile
@@ -23,6 +23,7 @@ $(call allow-override,LD_SO_CONF_PATH,/etc/ld.so.conf.d/)
$(call allow-override,LDCONFIG,ldconfig)
INSTALL = install
+MKDIR = mkdir
FOPTS := -flto=auto -ffat-lto-objects -fexceptions -fstack-protector-strong \
-fasynchronous-unwind-tables -fstack-clash-protection
WOPTS := -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -Wno-maybe-uninitialized
@@ -103,7 +104,7 @@ static: $(OBJ)
.PHONY: install
install: doc_install
- $(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)
+ $(MKDIR) -p $(DESTDIR)$(BINDIR)
$(INSTALL) rtla -m 755 $(DESTDIR)$(BINDIR)
$(STRIP) $(DESTDIR)$(BINDIR)/rtla
@test ! -f $(DESTDIR)$(BINDIR)/osnoise || rm $(DESTDIR)$(BINDIR)/osnoise