Changeset 1679
- Timestamp:
- Jul 28, 2012, 11:41:21 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/build/lol-build
r1677 r1679 32 32 platform="$2" 33 33 34 ############################################################################### 35 # Initialisation code 36 # 37 # - sets the top_srcdir variable 38 # - sets the LOL_PARALLEL variable 39 # - fix PATH and MKPATH if necessary 40 # 34 41 __init__() 35 42 { … … 37 44 cd "$top_srcdir" 38 45 top_srcdir="`pwd`" 46 47 case "$cpu_count" in 48 [1-9]|[1-9][0-9]|[1-9][0-9][0-9]) ;; 49 *) if [ -r "/proc/cpuinfo" ]; then 50 cpu_count="$(grep -c '^processor\>' /proc/cpuinfo)" 51 fi ;; 52 esac 53 case "$cpu_count" in 54 [1-9]|[1-9][0-9]|[1-9][0-9][0-9]) ;; 55 *) cpu_count="$(sysctl -n hw.ncpu 2>/dev/null)" ;; 56 esac 57 case "$cpu_count" in 58 [1-9]|[1-9][0-9]|[1-9][0-9][0-9]) ;; 59 *) cpu_count=1 ;; 60 esac 61 case "$cpu_count" in 62 1) LOL_PARALLEL=1 ;; 63 2) LOL_PARALLEL=3 ;; 64 *) LOL_PARALLEL="$(expr $cpu_count '*' 3 / 2)" ;; 65 esac 39 66 40 67 case "${MSYSTEM}" in … … 189 216 ;; 190 217 *) 191 make -j 6218 make -j$LOL_PARALLEL 192 219 ;; 193 220 esac
Note: See TracChangeset
for help on using the changeset viewer.