Skip to content

Commit

Permalink
tools/bpftool: Support passing BPFTOOL_VERSION to make
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Quentin Monnet <quentin@isovalent.com>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20200917115833.1235518-1-Tony.Ambardar@gmail.com
  • Loading branch information
Tony Ambardar authored and borkmann committed Sep 18, 2020
1 parent 642e450 commit ba2fd56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/bpf/bpftool/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit ba2fd56

Please sign in to comment.