aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/os
diff options
context:
space:
mode:
authorJack Nagel2014-05-01 18:36:46 -0500
committerJack Nagel2014-05-01 18:36:46 -0500
commit71055aa073dc7583f0f4b6267f0663088d8f28d1 (patch)
tree58c6f2800be0fede365d83d54056985158e44f38 /Library/Homebrew/os
parent564b5df2614c112103766202bcea644ab6851d3a (diff)
downloadbrew-71055aa073dc7583f0f4b6267f0663088d8f28d1.tar.bz2
Move xctoolchain_path to Xcode module, where it belongs
Diffstat (limited to 'Library/Homebrew/os')
-rw-r--r--Library/Homebrew/os/mac.rb10
-rw-r--r--Library/Homebrew/os/mac/xcode.rb4
2 files changed, 4 insertions, 10 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb
index 37939264d..6ed35440d 100644
--- a/Library/Homebrew/os/mac.rb
+++ b/Library/Homebrew/os/mac.rb
@@ -56,16 +56,6 @@ module OS
%w{cc make}.all? { |tool| File.executable? "#{prefix}/usr/bin/#{tool}" }
end
- def xctoolchain_path
- # As of Xcode 4.3, some tools are located in the "xctoolchain" directory
- @xctoolchain_path ||= begin
- path = Pathname.new("#{Xcode.prefix}/Toolchains/XcodeDefault.xctoolchain")
- # If only the CLT are installed, all tools will be under dev_tools_path,
- # this path won't exist, and xctoolchain_path will be nil.
- path if path.exist?
- end
- end
-
def sdk_path(v = version)
(@sdk_path ||= {}).fetch(v.to_s) do |key|
opts = []
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb
index 41f809835..4c79e3965 100644
--- a/Library/Homebrew/os/mac/xcode.rb
+++ b/Library/Homebrew/os/mac/xcode.rb
@@ -61,6 +61,10 @@ module OS
end
end
+ def toolchain_path
+ Pathname.new("#{prefix}/Toolchains/XcodeDefault.xctoolchain") if installed? && version >= "4.3"
+ end
+
# Ask Spotlight where Xcode is. If the user didn't install the
# helper tools and installed Xcode in a non-conventional place, this
# is our only option. See: http://superuser.com/questions/390757