tools/bpftool: support passing BPFTOOL_VERSION to make
Subsystems (4)
PATCH 1/1 tools/bpftool: support passing BPFTOOL_VERSION to make
This change facilitates out-of-tree builds, packaging, and versioning for test and debug purposes. Defining BPFTOOL_VERSION allows self-contained builds within the tools tree, since it avoids use of the 'kernelversion' target in the top-level makefile, which would otherwise pull in several other includes from outside the tools tree.
--- tools/bpf/bpftool/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/bpf/bpftool/Makefile +1 -1
@@ -25,7 +25,7 @@ endif LIBBPF = $(LIBBPF_PATH)libbpf.a -BPFTOOL_VERSION := $(shell make -rR --no-print-directory -sC ../../.. kernelversion) +BPFTOOL_VERSION ?= $(shell make -rR --no-print-directory -sC ../../.. kernelversion) $(LIBBPF): FORCE $(if $(LIBBPF_OUTPUT),@mkdir -p $(LIBBPF_OUTPUT))
Signature · 1 line
2.25.1
Quoted 7 lines · Tony Ambardar
This change facilitates out-of-tree builds, packaging, and versioning for test and debug purposes. Defining
BPFTOOL_VERSIONallows self-contained builds within the tools tree, since it avoids use of the 'kernelversion' target in the top-level makefile, which would otherwise pull in several other includes from outside the tools tree.Signed-off-by Tony Ambardar <[email protected]>
Quoted 11 lines · Quentin Monnet
Quoted 7 lines · Tony Ambardar
This change facilitates out-of-tree builds, packaging, and versioning for test and debug purposes. Defining
BPFTOOL_VERSIONallows self-contained builds within the tools tree, since it avoids use of the 'kernelversion' target in the top-level makefile, which would otherwise pull in several other includes from outside the tools tree.Signed-off-by Tony Ambardar <[email protected]>Acked-by Quentin Monnet <[email protected]>
Quoted 10 lines · Song Liu
Quoted 8 lines · Quentin Monnet
Quoted 6 lines · Tony Ambardar
This change facilitates out-of-tree builds, packaging, and versioning for test and debug purposes. Defining
BPFTOOL_VERSIONallows self-contained builds within the tools tree, since it avoids use of the 'kernelversion' target in the top-level makefile, which would otherwise pull in several other includes from outside the tools tree.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Tony Ambardar <[email protected]>Acked-by Quentin Monnet <[email protected]>Acked-by Song Liu <[email protected]>
I should clarify for those performing stand-alone builds that a few items are still required from outside the tools/ tree:
kernel/bpf/disasm.[ch] and scripts/bpf_helpers_doc.py. Not sure that's worth updating the commit description however.
Quoted 7 lines · Tony Ambardar
This change facilitates out-of-tree builds, packaging, and versioning for test and debug purposes. Defining
BPFTOOL_VERSIONallows self-contained builds within the tools tree, since it avoids use of the 'kernelversion' target in the top-level makefile, which would otherwise pull in several other includes from outside the tools tree.Signed-off-by Tony Ambardar <[email protected]>
Applied, thanks!