diff options
| author | Jack Nagel | 2014-05-01 18:36:46 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-05-01 18:36:46 -0500 |
| commit | 78ed677ba2dab74dec7983c56b6f77f96c8da182 (patch) | |
| tree | 93d9c1f07b98e0c0b2995669190ad8a2c4d1105d /Library/Homebrew/os | |
| parent | 94bc0b8b76197c581af28294149faa987e4e322d (diff) | |
| download | homebrew-78ed677ba2dab74dec7983c56b6f77f96c8da182.tar.bz2 | |
Rename Xcode.folder to MacOS.active_developer_dir
This reflects what Apple calls it in more recent versions of Xcode/OS X.
Diffstat (limited to 'Library/Homebrew/os')
| -rw-r--r-- | Library/Homebrew/os/mac.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/os/mac/xcode.rb | 10 |
2 files changed, 5 insertions, 9 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index 6ed35440d..c2dd1a1f6 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -36,6 +36,10 @@ module OS end end + def active_developer_dir + @active_developer_dir ||= `xcode-select -print-path 2>/dev/null`.strip + end + def dev_tools_prefix dev_tools_path.parent.parent end diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 4c79e3965..284214b26 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -7,14 +7,6 @@ module OS V3_BUNDLE_ID = "com.apple.Xcode" V4_BUNDLE_PATH = Pathname.new("/Applications/Xcode.app") - # Locate the "current Xcode folder" via xcode-select. See: - # man xcode-select - # TODO Should this be moved to OS::Mac? As of 10.9 this is referred to - # as the "developer directory", and be either a CLT or Xcode instance. - def folder - @folder ||= `xcode-select -print-path 2>/dev/null`.strip - end - def latest_version case MacOS.version when "10.4" then "2.5" @@ -43,7 +35,7 @@ module OS def prefix @prefix ||= begin - path = Pathname.new(folder) + path = Pathname.new(MacOS.active_developer_dir) if path != CLT::MAVERICKS_PKG_PATH and path.absolute? \ and File.executable? "#{path}/usr/bin/make" path |
