Skip to contentSkip to conversation

tools/rtla: Fix installation from out-of-tree build

PATCH Ben Hutchings 4 participants 5 messages Sep 15, 2024 – Oct 14, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

rtla now supports out-of-tree builds, but installation fails as it still tries to install the rtla binary from the source tree. Use the existing macro $(RTLA) to refer to the binary.

Fixes 01474dc706ca ("tools/rtla: Use tools/build makefiles to build rtla")

---

tools/tracing/rtla/Makefile.rtla +1 -1
@@ -38,7 +38,7 @@ BINDIR		:= /usr/bin
 .PHONY: install
 install: doc_install
 	@$(MKDIR) -p $(DESTDIR)$(BINDIR)
-	$(call QUIET_INSTALL,rtla)$(INSTALL) rtla -m 755 $(DESTDIR)$(BINDIR)
+	$(call QUIET_INSTALL,rtla)$(INSTALL) $(RTLA) -m 755 $(DESTDIR)$(BINDIR)
 	@$(STRIP) $(DESTDIR)$(BINDIR)/rtla
 	@test ! -f $(DESTDIR)$(BINDIR)/osnoise || $(RM) $(DESTDIR)$(BINDIR)/osnoise
 	@$(LN) rtla $(DESTDIR)$(BINDIR)/osnoise
maintainer Reviewed-by Tested-by
#1 lore raw

po 16. 9. 2024 v 1:32 odesílatel Ben Hutchings <[email protected]> napsal:

Quoted 11 lines

rtla now supports out-of-tree builds, but installation fails as it still tries to install the rtla binary from the source tree. Use the existing macro $(RTLA) to refer to the binary.

Fixes 01474dc706ca ("tools/rtla: Use tools/build makefiles to build rtla")

---

tools/tracing/rtla/Makefile.rtla BINDIR := /usr/bin · line 44

Quoted 8 lines
tools/tracing/rtla/Makefile.rtla +1 -1
@@ -38,7 +38,7 @@ BINDIR                := /usr/bin
 .PHONY: install
 install: doc_install
        @$(MKDIR) -p $(DESTDIR)$(BINDIR)
-       $(call QUIET_INSTALL,rtla)$(INSTALL) rtla -m 755 $(DESTDIR)$(BINDIR)
+       $(call QUIET_INSTALL,rtla)$(INSTALL) $(RTLA) -m 755 $(DESTDIR)$(BINDIR)
        @$(STRIP) $(DESTDIR)$(BINDIR)/rtla
        @test ! -f $(DESTDIR)$(BINDIR)/osnoise || $(RM) $(DESTDIR)$(BINDIR)/osnoise
        @$(LN) rtla $(DESTDIR)$(BINDIR)/osnoise

Out-of-tree install is fixed for me when applied on latest upstream top (e8fc317dfca9 "Merge tag 'vfs-6.12.procfs' of
git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs").

Tomas

#2 lore raw
In reply to Ben Hutchings
Quoted 11 lines · Ben Hutchings

rtla now supports out-of-tree builds, but installation fails as it still tries to install the rtla binary from the source tree. Use the existing macro $(RTLA) to refer to the binary.

Fixes 01474dc706ca ("tools/rtla: Use tools/build makefiles to build rtla")

---

tools/tracing/rtla/Makefile.rtla BINDIR := /usr/bin · line 44

Quoted 8 lines
tools/tracing/rtla/Makefile.rtla +1 -1
@@ -38,7 +38,7 @@ BINDIR		:= /usr/bin
 .PHONY: install
 install: doc_install
 	@$(MKDIR) -p $(DESTDIR)$(BINDIR)
-	$(call QUIET_INSTALL,rtla)$(INSTALL) rtla -m 755 $(DESTDIR)$(BINDIR)
+	$(call QUIET_INSTALL,rtla)$(INSTALL) $(RTLA) -m 755 $(DESTDIR)$(BINDIR)
 	@$(STRIP) $(DESTDIR)$(BINDIR)/rtla
 	@test ! -f $(DESTDIR)$(BINDIR)/osnoise || $(RM) $(DESTDIR)$(BINDIR)/osnoise
 	@$(LN) rtla $(DESTDIR)$(BINDIR)/osnoise

Is Debian using out of tree builds Ben?
This is upstream already which is fine, but I remember Daniel telling me that he believed the distributions were no longer using out of tree builds and he wanted to remove this capability in order to simplify the build system.

John Kacur

#3 lore raw
Quoted 16 lines · John Kacur
Quoted 13 lines · Ben Hutchings

rtla now supports out-of-tree builds, but installation fails as it still tries to install the rtla binary from the source tree. Use the existing macro $(RTLA) to refer to the binary.

Fixes 01474dc706ca ("tools/rtla: Use tools/build makefiles to build rtla")

---

tools/tracing/rtla/Makefile.rtla +0 -0
@@ -38,7 +38,7 @@ BINDIR		:= /usr/bin
 .PHONY: install
 install: doc_install
 	@$(MKDIR) -p $(DESTDIR)$(BINDIR)
Quoted 8 lines

tools/tracing/rtla/Makefile.rtla BINDIR := /usr/bin · line 44

Quoted 6 lines
tools/tracing/rtla/Makefile.rtla +1 -1
-	$(call QUIET_INSTALL,rtla)$(INSTALL) rtla -m 755 $(DESTDIR)$(BINDIR)
+	$(call QUIET_INSTALL,rtla)$(INSTALL) $(RTLA) -m 755 $(DESTDIR)$(BINDIR)
 	@$(STRIP) $(DESTDIR)$(BINDIR)/rtla
 	@test ! -f $(DESTDIR)$(BINDIR)/osnoise || $(RM) $(DESTDIR)$(BINDIR)/osnoise
 	@$(LN) rtla $(DESTDIR)$(BINDIR)/osnoise

Is Debian using out of tree builds Ben?

[...]

In the linux package specifically, yes, we try to do all builds out-of- tree.

Ben.

Signature · 2 lines
Ben Hutchings - Debian developer, member of kernel, installer and LTS
teams
maintainer
#4 lore raw
Quoted 5 lines · On Sun, 13 Oct 2024 22:34:49 +0200 Ben Hutchings <[email protected]> wrote:
Quoted 1 line

Is Debian using out of tree builds Ben?

[...]

In the linux package specifically, yes, we try to do all builds out-of- tree.

Right. Out-of-tree builds is pretty much a must for anything in the Linux kernel tree.

-- Steve