2018-09-27 18:26:03 -07:00
|
|
|
class DevelopmentTools
|
|
|
|
class << self
|
2018-10-01 15:34:47 -07:00
|
|
|
def locate(tool)
|
|
|
|
(@locate ||= {}).fetch(tool) do |key|
|
|
|
|
@locate[key] = if (path = HOMEBREW_PREFIX/"bin/#{tool}").executable?
|
|
|
|
path
|
|
|
|
elsif File.executable?(path = "/usr/bin/#{tool}")
|
|
|
|
Pathname.new path
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-09-27 18:26:03 -07:00
|
|
|
def default_compiler
|
|
|
|
:gcc
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|