From c8f795ba53acfe0239bfa5d75f64dce8e390a992 Mon Sep 17 00:00:00 2001 From: наб Date: Thu, 23 Dec 2021 21:26:19 +0100 Subject: config: check for parallel(1), use it for cstyle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Ahelenia Ziemiańska Issue #12899 --- Makefile.am | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 7e2b10b39..36d8cd2d6 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 \ @@ -122,7 +127,7 @@ cstyle: ! -name 'opt_global.h' ! -name '*_if*.h' \ ! -name 'zstd_compat_wrapper.h' \ ! -path './module/zstd/lib/*' \ - -exec ${top_srcdir}/scripts/cstyle.pl -cpP {} \+ + $(cstyle_line) filter_executable = -exec test -x '{}' \; -print -- cgit v1.2.3