bpftool: Fix version string in recursive builds
authorBen Hutchings <benh@debian.org>
Thu, 13 Aug 2020 23:43:54 +0000 (00:43 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Fri, 9 Apr 2021 18:17:58 +0000 (19:17 +0100)
commitb961425a1c26b506b2f88360c57a15dfe274eae9
tree326169271f20d39773284ee4557f8b311602451e
parentf9b1e9a11ef97880f77d61fce99fd6dc83b2f540
bpftool: Fix version string in recursive builds

Forwarded: https://lore.kernel.org/bpf/20200813235837.GA497088@decadent.org.uk/T/#u

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@debian.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name bpftool-fix-version-string-in-recursive-builds.patch
tools/bpf/bpftool/Makefile