diff options
| author | Misty De Meo | 2015-06-26 20:06:11 -0700 | 
|---|---|---|
| committer | Misty De Meo | 2016-04-22 22:37:21 -0700 | 
| commit | 2008c880dd4b0877fbe0a61e6ae9345e77b836f6 (patch) | |
| tree | 7ff7f2116e6cc4b1503001d4135881dd840c2589 /Library/Homebrew/extend/fileutils.rb | |
| parent | 2d81c6878fe4d476d104bf79aa5af8d71934a2a9 (diff) | |
| download | brew-2008c880dd4b0877fbe0a61e6ae9345e77b836f6.tar.bz2 | |
Add a helper to determine make path on Tiger
Diffstat (limited to 'Library/Homebrew/extend/fileutils.rb')
| -rw-r--r-- | Library/Homebrew/extend/fileutils.rb | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/Library/Homebrew/extend/fileutils.rb b/Library/Homebrew/extend/fileutils.rb index 188b0ccbf..893c1e723 100644 --- a/Library/Homebrew/extend/fileutils.rb +++ b/Library/Homebrew/extend/fileutils.rb @@ -156,6 +156,19 @@ module FileUtils      system RUBY_BIN/"rake", *args    end +  # Run `make` 3.81 or newer. +  # Uses the system make on Leopard and newer, and the +  # path to the actually-installed make on Tiger or older. +  def make(*args) +    if Utils.popen_read("/usr/bin/make", "--version").match(/Make (\d\.\d+)/)[1] > "3.80" +      system "/usr/bin/make", *args +    else +      make = Formula["make"].opt_bin/"make" +      make_path = make.exist? ? make.to_s : (Formula["make"].opt_bin/"gmake").to_s +      system make_path, *args +    end +  end +    if method_defined?(:ruby)      # @private      alias_method :old_ruby, :ruby | 
