aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-05-13 18:40:04 -0500
committerJack Nagel2012-05-13 18:43:14 -0500
commit28f89c59a2b39738df5a6fc85711be9af250fb53 (patch)
treea37e18246dc9bb2d0c07650cc8d4cf4db8450e7f /Library
parent71d34a86d6cfa6c9d5b20cd56b3cccd013339448 (diff)
downloadbrew-28f89c59a2b39738df5a6fc85711be9af250fb53.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')
-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"