diff options
| author | Max Howell | 2012-08-23 16:15:26 -0400 |
|---|---|---|
| committer | Max Howell | 2012-08-29 12:41:34 -0400 |
| commit | 1ec368759ea3b2a1aa7484988d3494b3ba212c95 (patch) | |
| tree | c7048e6bbbee4d9f1062c452ac4c580a4012ea00 /Library | |
| parent | 36de29f65eb6a5fa6a42fb8b5e71f123c515243d (diff) | |
| download | brew-1ec368759ea3b2a1aa7484988d3494b3ba212c95.tar.bz2 | |
Support HOMEBREW_MAKE_JOBS
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/superenv.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Library/Homebrew/superenv.rb b/Library/Homebrew/superenv.rb index 8061abaf4..f9e8761bf 100644 --- a/Library/Homebrew/superenv.rb +++ b/Library/Homebrew/superenv.rb @@ -29,9 +29,7 @@ class << ENV %w{CC CXX LD CPP OBJC MAKE CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS LDFLAGS CPPFLAGS MACOS_DEPLOYMENT_TARGET SDKROOT - CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH - HOMEBREW_CCCFG HOMEBREW_DEP_PREFIXES - MAKEFLAGS MAKEJOBS}. + CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH}. each{ |x| delete(x) } delete('CDPATH') # avoid make issues that depend on changing directories delete('GREP_OPTIONS') # can break CMake @@ -51,7 +49,7 @@ class << ENV ENV['LD'] = 'ld' ENV['CPP'] = 'cpp' ENV['MAKE'] = 'make' - ENV['MAKEFLAGS'] ||= "-j#{Hardware.processor_count}" + ENV['MAKEFLAGS'] ||= "-j#{determine_make_jobs}" ENV['PATH'] = determine_path ENV['PKG_CONFIG_PATH'] = determine_pkg_config_path ENV['HOMEBREW_CC'] = determine_cc @@ -149,6 +147,14 @@ class << ENV paths.to_path_s end + def determine_make_jobs + if (j = ENV['HOMEBREW_MAKE_JOBS'].to_i) < 1 + Hardware.processor_count + else + j + end + end + public ### NO LONGER NECESSARY OR NO LONGER SUPPORTED |
