[PATCH v1] tools: Fix compile error of pfrut/firewire

From: Riwen Lu
Date: Fri Mar 28 2025 - 03:48:18 EST


The value -rR of MAKEFLAGS implicit do not use make's built-in rules and
variables. Previous commit d1d096312176 ("tools: fix annoying "mkdir -p
..." logs when building tools in parallel") removed the MAKEFLAGS=
command for tools and caused the built-in rules for pfrut/firewire
failed to take effect.

Reported-by: k2ci <kernel-bot@xxxxxxxxxx>
Signed-off-by: Riwen Lu <luriwen@xxxxxxxxxx>
---
tools/firewire/Makefile | 7 +++++++
tools/power/acpi/tools/pfrut/Makefile | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/firewire/Makefile b/tools/firewire/Makefile
index 67b6e9fca83c..8ba53e1173c6 100644
--- a/tools/firewire/Makefile
+++ b/tools/firewire/Makefile
@@ -12,6 +12,13 @@ nosy-dump : LDFLAGS = -g
nosy-dump : LDLIBS = -lpopt

nosy-dump : nosy-dump.o decode-fcp.o
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+
+nosy-dump.o : nosy-dump.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+decode-fcp.o : decode-fcp.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<

clean :
rm -rf *.o nosy-dump
diff --git a/tools/power/acpi/tools/pfrut/Makefile b/tools/power/acpi/tools/pfrut/Makefile
index 61c1a96fd433..e682ee135f1d 100644
--- a/tools/power/acpi/tools/pfrut/Makefile
+++ b/tools/power/acpi/tools/pfrut/Makefile
@@ -8,7 +8,7 @@ EXTRA_UNINSTALL = uninstall-man

CFLAGS += -Wall -O2
CFLAGS += -DPFRUT_HEADER='"../../../../../include/uapi/linux/pfrut.h"'
-LDFLAGS += -luuid
+override LDFLAGS += -luuid

TOOL_OBJS = \
pfrut.o
--
2.25.1