Support HOMEBREW_MAKE_JOBS
This commit is contained in:
parent
36de29f65e
commit
1ec368759e
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user