Skip to content

Commit dc3a880

Browse files
Pu LehuiAlexei Starovoitov
authored andcommitted
selftests/bpf: Adapt OUTPUT appending logic to lower versions of Make
The $(let ...) function is only supported by GNU Make version 4.4 [0] and above, otherwise the following exception file or directory will be generated: tools/testing/selftests/bpfFEATURE-DUMP.selftests tools/testing/selftests/bpffeature/ Considering that the GNU Make version of most Linux distributions is lower than 4.4, let us adapt the corresponding logic to it. Link: https://lists.gnu.org/archive/html/info-gnu/2022-10/msg00008.html [0] Acked-by: Eduard Zingerman <[email protected]> Signed-off-by: Pu Lehui <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent bd4d67f commit dc3a880

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/testing/selftests/bpf/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,14 @@ FEATURE_TESTS := llvm
187187
FEATURE_DISPLAY := $(FEATURE_TESTS)
188188

189189
# Makefile.feature expects OUTPUT to end with a slash
190+
ifeq ($(shell expr $(MAKE_VERSION) \>= 4.4), 1)
190191
$(let OUTPUT,$(OUTPUT)/,\
191192
$(eval include ../../../build/Makefile.feature))
193+
else
194+
OUTPUT := $(OUTPUT)/
195+
$(eval include ../../../build/Makefile.feature)
196+
OUTPUT := $(patsubst %/,%,$(OUTPUT))
197+
endif
192198
endif
193199

194200
ifeq ($(feature-llvm),1)

0 commit comments

Comments
 (0)