aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/os
diff options
context:
space:
mode:
authorWilliam Woodruff2015-08-12 14:57:54 -0400
committerMisty De Meo2015-08-21 11:02:33 -0700
commit8793a68ee422a2cee7035c1d564fbd81d0c72dc4 (patch)
tree433997fbad1f3e746b57e1884019f0aef83982b5 /Library/Homebrew/os
parent1face808f5f1dc43c887cab421b5c01f7e20fdf7 (diff)
downloadbrew-8793a68ee422a2cee7035c1d564fbd81d0c72dc4.tar.bz2
Add no-Xcode documentation for all classes, methods
Diffstat (limited to 'Library/Homebrew/os')
-rw-r--r--Library/Homebrew/os/mac.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb
index 814ef70a2..c2c909d76 100644
--- a/Library/Homebrew/os/mac.rb
+++ b/Library/Homebrew/os/mac.rb
@@ -36,6 +36,8 @@ module OS
end
end
+ # Locates a (working) copy of install_name_tool, guaranteed to function
+ # whether the user has developer tools installed or not.
def install_name_tool
if File.executable?(path = "#{HOMEBREW_PREFIX}/opt/cctools/bin/install_name_tool")
Pathname.new(path)
@@ -44,6 +46,8 @@ module OS
end
end
+ # Locates a (working) copy of otool, guaranteed to function whether the user
+ # has developer tools installed or not.
def otool
if File.executable?(path = "#{HOMEBREW_PREFIX}/opt/cctools/bin/otool")
Pathname.new(path)
@@ -52,6 +56,9 @@ module OS
end
end
+ # Checks if the user has any developer tools installed, either via Xcode
+ # or the CLT. Convenient for guarding against formula builds when building
+ # is impossible.
def has_apple_developer_tools?
Xcode.installed? || CLT.installed?
end