mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	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 <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Issue #12899
This commit is contained in:
		
							parent
							
								
									7bbfac9d04
								
							
						
					
					
						commit
						c8f795ba53
					
				@ -114,6 +114,11 @@ commitcheck:
 | 
				
			|||||||
		${top_srcdir}/scripts/commitcheck.sh; \
 | 
							${top_srcdir}/scripts/commitcheck.sh; \
 | 
				
			||||||
	fi
 | 
						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
 | 
					PHONY += cstyle
 | 
				
			||||||
cstyle:
 | 
					cstyle:
 | 
				
			||||||
	@find ${top_srcdir} -name build -prune \
 | 
						@find ${top_srcdir} -name build -prune \
 | 
				
			||||||
@ -122,7 +127,7 @@ cstyle:
 | 
				
			|||||||
		! -name 'opt_global.h' ! -name '*_if*.h' \
 | 
							! -name 'opt_global.h' ! -name '*_if*.h' \
 | 
				
			||||||
		! -name 'zstd_compat_wrapper.h' \
 | 
							! -name 'zstd_compat_wrapper.h' \
 | 
				
			||||||
		! -path './module/zstd/lib/*' \
 | 
							! -path './module/zstd/lib/*' \
 | 
				
			||||||
		-exec ${top_srcdir}/scripts/cstyle.pl -cpP {} \+
 | 
							$(cstyle_line)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
filter_executable = -exec test -x '{}' \; -print
 | 
					filter_executable = -exec test -x '{}' \; -print
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										8
									
								
								config/always-parallel.m4
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								config/always-parallel.m4
									
									
									
									
									
										Normal file
									
								
							@ -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"])
 | 
				
			||||||
 | 
					])
 | 
				
			||||||
@ -226,6 +226,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
 | 
				
			|||||||
	ZFS_AC_CONFIG_ALWAYS_SED
 | 
						ZFS_AC_CONFIG_ALWAYS_SED
 | 
				
			||||||
	ZFS_AC_CONFIG_ALWAYS_CPPCHECK
 | 
						ZFS_AC_CONFIG_ALWAYS_CPPCHECK
 | 
				
			||||||
	ZFS_AC_CONFIG_ALWAYS_SHELLCHECK
 | 
						ZFS_AC_CONFIG_ALWAYS_SHELLCHECK
 | 
				
			||||||
 | 
						ZFS_AC_CONFIG_ALWAYS_PARALLEL
 | 
				
			||||||
])
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AC_DEFUN([ZFS_AC_CONFIG], [
 | 
					AC_DEFUN([ZFS_AC_CONFIG], [
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user