diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-06-28 14:41:35 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-07-01 01:01:50 +0200 |
commit | c256429fbd01d6993a2e19ff24f252514a0b84a5 (patch) | |
tree | c1ffa7cad1baaa4f888aabf52318204d29867c46 /tools/bpf | |
parent | 509fda105ba8f9a1a5c6f8b79e4c7fc50b35c1e3 (diff) | |
download | linux-stable-c256429fbd01d6993a2e19ff24f252514a0b84a5.tar.gz linux-stable-c256429fbd01d6993a2e19ff24f252514a0b84a5.tar.bz2 linux-stable-c256429fbd01d6993a2e19ff24f252514a0b84a5.zip |
tools: bpftool: use correct make variable type to improve compilation time
Commit 4bfe3bd3cc35 ("tools/bpftool: use version from the kernel
source tree") added version to bpftool. The version used is
equal to the kernel version and obtained by running make kernelversion
against kernel source tree. Version is then communicated
to the sources with a command line define set in CFLAGS.
Use a simply expanded variable for the version, otherwise the
recursive make will run every time CFLAGS are used.
This brings the single-job compilation time for me from almost
16 sec down to less than 4 sec.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf')
-rw-r--r-- | tools/bpf/bpftool/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile index 892dbf095bff..0911b00b25cc 100644 --- a/tools/bpf/bpftool/Makefile +++ b/tools/bpf/bpftool/Makefile @@ -23,7 +23,7 @@ endif LIBBPF = $(BPF_PATH)libbpf.a -BPFTOOL_VERSION=$(shell make --no-print-directory -sC ../../.. kernelversion) +BPFTOOL_VERSION := $(shell make --no-print-directory -sC ../../.. kernelversion) $(LIBBPF): FORCE $(Q)$(MAKE) -C $(BPF_DIR) OUTPUT=$(OUTPUT) $(OUTPUT)libbpf.a FEATURES_DUMP=$(FEATURE_DUMP_EXPORT) |