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

Riwen Lu <[email protected]>
Newsgroups gmane.linux.acpi.devel,gmane.linux.kernel.firewire.devel,gmane.linux.kernel
Message-ID <[email protected]>
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 <[email protected]>
Signed-off-by: Riwen Lu <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.