[PATCH] bpftool: Fix version string in recursive builds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When bpftool is built as part of a Debian package build, which itself
uses make, "bpftool version" shows:

    bpftool vmake[4]: Entering directory /build/linux-5.8/tools/bpf/bpftool 5.8.8.0 make[4]: Leaving directory /build/linux-5.8

Although we pass the "--no-print-directory" option, this is overridden
by the environment variable "MAKEFLAGS=w".  Clear MAKEFLAGS for the
"make kernelversion" command.

I have no explanation for the doubled ".8" in the version string, but
this seems to fix that as well.

Signed-off-by: Ben Hutchings <benh@xxxxxxxxxx>
---
 tools/bpf/bpftool/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index 9e85f101be85..7fbad8cbd171 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -25,7 +25,7 @@ endif
 
 LIBBPF = $(LIBBPF_PATH)libbpf.a
 
-BPFTOOL_VERSION := $(shell make -rR --no-print-directory -sC ../../.. kernelversion)
+BPFTOOL_VERSION := $(shell MAKEFLAGS= make -rR --no-print-directory -sC ../../.. kernelversion)
 
 $(LIBBPF): FORCE
 	$(if $(LIBBPF_OUTPUT),@mkdir -p $(LIBBPF_OUTPUT))

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux