Skip to content

Commit 39af674

Browse files
Yicong Yangacmel
authored andcommitted
perf build: Make minimal shellcheck version to v0.6.0
The perf build failed due to the shellcheck on my machine (v0.4.6 on Ubuntu 18.04.1 LTS) doesn't support -a/--check-sourced and -S/--severity option. These two options are introduced in shellcheck v0.4.7 and v0.6.0 respectively. So restrict the minimal version of shellcheck to v0.6.0. Fixes: b809fc6 ("perf build: Shellcheck support for OUTPUT directory") Reviewed-by: Ian Rogers <[email protected]> Signed-off-by: Yicong Yang <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Junhao He <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 1233d1d commit 39af674

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tools/perf/Makefile.perf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,16 @@ else
236236
SHELLCHECK := $(shell which shellcheck 2> /dev/null)
237237
endif
238238

239+
# shellcheck is using in tools/perf/tests/Build with option -a/--check-sourced (
240+
# introduced in v0.4.7) and -S/--severity (introduced in v0.6.0). So make the
241+
# minimal shellcheck version as v0.6.0.
242+
ifneq ($(SHELLCHECK),)
243+
ifeq ($(shell expr $(shell $(SHELLCHECK) --version | grep version: | \
244+
sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \< 060), 1)
245+
SHELLCHECK :=
246+
endif
247+
endif
248+
239249
export srctree OUTPUT RM CC CXX LD AR CFLAGS CXXFLAGS V BISON FLEX AWK
240250
export HOSTCC HOSTLD HOSTAR HOSTCFLAGS SHELLCHECK
241251

0 commit comments

Comments
 (0)