diff mbox series

[01/10] libtraceevent: Fix installing of man pages in remote directory

Message ID 20211216213956.13934-2-rostedt@goodmis.org (mailing list archive)
State Accepted
Commit 727da2c38c8a93830c7e04b206d4263f73be5bf3
Headers show
Series libtraceevent: Makefile updates fixes and unit tests | expand

Commit Message

Steven Rostedt Dec. 16, 2021, 9:39 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

When the building of the man pages is done in a directory other than the
repo directory (with the O= option), the intermediate build file name
incorrectly appends a "install-" prefix to the path and not to the file,
causing the installation to fail.

Fix it by using patsubst instead of addprefix to append the "install-"
name to the intermediate files for the installation.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Documentation/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 73dbe2ae4d43..af124572c863 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -154,12 +154,12 @@  ifdef missing_tools
 	$(error "You need to install $(missing_tools) for man pages")
 endif
 
-install-%.3: $(OUTPUT)%.3
+$(OUTPUT)install-%.3: $(OUTPUT)%.3
 	$(call QUIET_INSTALL, $<) \
 		$(INSTALL) -d -m 755 $(DESTDIR)$(man3dir); \
 		$(INSTALL) -m 644 $< $(DESTDIR)$(man3dir);
 
-do-install-man: man $(addprefix install-,$(wildcard $(OUTPUT)*.3))
+do-install-man: man $(patsubst $(OUTPUT)%,$(OUTPUT)install-%,$(wildcard $(OUTPUT)*.3))
 
 install-man: check-man-tools man
 	$(Q)$(MAKE) -C . do-install-man