diff --git a/Makefile.am b/Makefile.am index 7e2b10b39dee..36d8cd2d6fb8 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 diff --git a/config/always-parallel.m4 b/config/always-parallel.m4 new file mode 100644 index 000000000000..c1f1ae78e7e7 --- /dev/null +++ b/config/always-parallel.m4 @@ -0,0 +1,8 @@ +dnl # +dnl # Check if GNU parallel is available. +dnl # +AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_PARALLEL], [ + AC_CHECK_PROG([PARALLEL], [parallel], [yes]) + + AM_CONDITIONAL([HAVE_PARALLEL], [test "x$PARALLEL" = "xyes"]) +]) diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 index 8ca596ecf06b..bd8e3ac80201 100644 --- a/config/zfs-build.m4 +++ b/config/zfs-build.m4 @@ -226,6 +226,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [ ZFS_AC_CONFIG_ALWAYS_SED ZFS_AC_CONFIG_ALWAYS_CPPCHECK ZFS_AC_CONFIG_ALWAYS_SHELLCHECK + ZFS_AC_CONFIG_ALWAYS_PARALLEL ]) AC_DEFUN([ZFS_AC_CONFIG], [