aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2012-05-13 18:40:04 -0500
committerJack Nagel2012-05-13 18:43:14 -0500
commitbfb295616a5eec6c2331ea7ec41c61bde72f965c (patch)
tree64f2af8a23f8f49eea647185f6b66ce62e781cbe /Library/Homebrew
parent05abb1e26fc7a33f491942cc19edebc7145f0e80 (diff)
downloadhomebrew-bfb295616a5eec6c2331ea7ec41c61bde72f965c.tar.bz2
FormulaInstaller: fold dirlist helper into check_m4
Having in_aclocal_dirlist? defined as a method on FormulaInstaller is a little weird; since its just a return condition of check_m4, move the code there. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/formula_installer.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index db893e2ad..22a9dd814 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -273,12 +273,6 @@ class FormulaInstaller
@paths ||= ENV['PATH'].split(':').map{ |p| File.expand_path p }
end
- def in_aclocal_dirlist?
- File.open("/usr/share/aclocal/dirlist") do |dirlist|
- dirlist.grep(%r{^#{HOMEBREW_PREFIX}/share/aclocal$}).length > 0
- end rescue false
- end
-
def check_PATH
# warn the user if stuff was installed outside of their PATH
[f.bin, f.sbin].each do |bin|
@@ -385,8 +379,12 @@ class FormulaInstaller
def check_m4
return if MacOS.xcode_version.to_f >= 4.3
+ return if File.open("/usr/share/aclocal/dirlist") do |dirlist|
+ dirlist.grep(%r{^#{HOMEBREW_PREFIX}/share/aclocal$}).length > 0
+ end rescue false
+
# Check for m4 files
- if Dir[f.share+"aclocal/*.m4"].length > 0 and not in_aclocal_dirlist?
+ if Dir[f.share+"aclocal/*.m4"].length > 0
opoo 'm4 macros were installed to "share/aclocal".'
puts "Homebrew does not append \"#{HOMEBREW_PREFIX}/share/aclocal\""
puts "to \"/usr/share/aclocal/dirlist\". If an autoconf script you use"