mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RESEND] tools/x86/kcpuid: Add missing dir via Makefile
@ 2024-05-31 11:17 Christian Heusel
  2024-06-06 15:00 ` Borislav Petkov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Christian Heusel @ 2024-05-31 11:17 UTC (permalink / raw)
  To: Borislav Petkov, linux-kernel; +Cc: Christian Heusel

So far the Makefile just installed the csv into $(HWDATADIR)/cpuid.csv,
which made it unaware about $DESTDIR. Add $DESTDIR to the install
command and while we are at it also create the directory, should it not
exist already. This eases the packaging of kcpuid and allows i.e. for
the install on arch to look like this:

    make BINDIR=/usr/bin DESTDIR="$pkgdir" -C tools/arch/x86/kcpuid install

So far this change is carried as a downstream patch.

Signed-off-by: Christian Heusel <christian@heusel.eu>
---
Resend to add missing linux-kernel@vger.kernel.org to recipients
---
 tools/arch/x86/kcpuid/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/arch/x86/kcpuid/Makefile b/tools/arch/x86/kcpuid/Makefile
index 87b554fab14b8..d0b4b0ed10ff9 100644
--- a/tools/arch/x86/kcpuid/Makefile
+++ b/tools/arch/x86/kcpuid/Makefile
@@ -19,6 +19,6 @@ clean :
 	@rm -f kcpuid

 install : kcpuid
-	install -d  $(DESTDIR)$(BINDIR)
+	install -d  $(DESTDIR)$(BINDIR) $(DESTDIR)$(HWDATADIR)
 	install -m 755 -p kcpuid $(DESTDIR)$(BINDIR)/kcpuid
-	install -m 444 -p cpuid.csv $(HWDATADIR)/cpuid.csv
+	install -m 444 -p cpuid.csv $(DESTDIR)$(HWDATADIR)/cpuid.csv
--
2.45.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-12 20:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-31 11:17 [PATCH RESEND] tools/x86/kcpuid: Add missing dir via Makefile Christian Heusel
2024-06-06 15:00 ` Borislav Petkov
2024-06-07 21:38 ` [tip: x86/misc] " tip-bot2 for Christian Heusel
2024-06-12 20:24 ` tip-bot2 for Christian Heusel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®