Changeset 2951 for box/trunk/infrastructure
- Timestamp:
- 01/05/2011 17:34:15 (13 months ago)
- File:
-
- 1 edited
-
box/trunk/infrastructure/BoxPlatform.pm.in (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/infrastructure/BoxPlatform.pm.in
r2561 r2951 83 83 $install_into_dir = '@sbindir_expanded@'; 84 84 85 # see how many processors there are, and set make flags accordingly 86 if($build_os eq 'Darwin' || $build_os =~ /(Free|Net|Open)BSD/) 87 { 88 $cpus = `sysctl -n hw.ncpu`; 89 } 90 elsif($build_os eq 'Linux') 91 { 92 $cpus = `grep -c ^processor /proc/cpuinfo`; 93 } 94 elsif($build_os eq 'SunOS') 95 { 96 $cpus = `psrinfo -p`; 97 } 98 99 chomp $cpus; 100 if($cpus > 1) 101 { 102 print STDERR "$cpus processors detected, will set make to perform concurrent jobs\n"; 103 $sub_make_options = ' -j '.($cpus + 1); 104 } 105 85 106 # if it's Darwin, 86 107 if($build_os eq 'Darwin') 87 108 { 88 # see how many processors there are, and set make flags accordingly89 my $cpus = `sysctl hw.ncpu`;90 if($cpus =~ m/hw.ncpu:\s(\d+)/ && $1 > 1)91 {92 print STDERR "$1 processors detected, will set make to perform concurrent jobs\n";93 $sub_make_options = ' -j '.($1 + 1);94 }95 96 109 # test for fink installation 97 110 if(-d '/sw/include' && -d '/sw/lib')
Note: See TracChangeset
for help on using the changeset viewer.
