diff options
author | наб <[email protected]> | 2021-12-23 21:26:19 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-01-06 12:46:42 -0800 |
commit | f788aaeb0e13891dafe5cf92936a439a711a30ea (patch) | |
tree | f4018ed745be2dce8e122de7416ebcf2190cb9a8 /Makefile.am | |
parent | 95aab0b7d22a9ca03684a8ff97ed0ddd37f39088 (diff) |
config: check for parallel(1), use it for cstyle
Before:
$ time make cstyle
real 0m23.118s
user 0m23.002s
sys 0m0.114s
After:
$ time make cstyle
real 0m4.577s
user 0m31.487s
sys 0m0.699s
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Issue #12899
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 34fe16ce4..d4b75264d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -114,6 +114,11 @@ commitcheck: ${top_srcdir}/scripts/commitcheck.sh; \ fi +if HAVE_PARALLEL +cstyle_line = -print0 | parallel -X0 ${top_srcdir}/scripts/cstyle.pl -cpP {} +else +cstyle_line = -exec ${top_srcdir}/scripts/cstyle.pl -cpP {} + +endif PHONY += cstyle cstyle: @find ${top_srcdir} -name build -prune \ @@ -121,7 +126,7 @@ cstyle: ! -name 'zfs_config.*' ! -name '*.mod.c' \ ! -name 'opt_global.h' ! -name '*_if*.h' \ ! -path './module/zstd/lib/*' \ - -exec ${top_srcdir}/scripts/cstyle.pl -cpP {} \+ + $(cstyle_line) filter_executable = -exec test -x '{}' \; -print |