1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0+ 3 # 4 # Figure out if we should follow a specific pa 5 # environment (as exported by scripts/jobserve 6 # the "auto" parallelism when "-jN" is not spe 7 # "make" invocation. 8 9 sphinx="$1" 10 shift || true 11 12 parallel="$PARALLELISM" 13 if [ -z "$parallel" ] ; then 14 # If no parallelism is specified at th 15 # fall back to the expected "-jauto" m 16 # target has had. 17 auto=$(perl -e 'open IN,"'"$sphinx"' - 18 while (<IN>) { 19 if (m/([\d\.]+ 20 print 21 } 22 } 23 close IN') 24 if [ -n "$auto" ] ; then 25 parallel="$auto" 26 fi 27 fi 28 # Only if some parallelism has been determined 29 if [ -n "$parallel" ] ; then 30 parallel="-j$parallel" 31 fi 32 33 exec "$sphinx" $parallel "$@"
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.