aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Buenemann2011-11-16 22:44:38 +0100
committerJack Nagel2012-01-01 23:15:31 -0600
commit6012e29986f6b9806477889e858980baee43d6a2 (patch)
treed810609f5fb7caa94be2ec19547808e1eefce96c
parentd7c1d355f163d83b5ace2811a739fb2d15698edf (diff)
downloadbrew-6012e29986f6b9806477889e858980baee43d6a2.tar.bz2
Omit check_m4 warning when appropriate
If the suggested modifications are already in place, just skip the warning. Closes Homebrew/homebrew#8624. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
-rw-r--r--Library/Homebrew/formula_installer.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index e6d846dd1..c2c04c8f3 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -202,6 +202,12 @@ 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|
@@ -252,7 +258,7 @@ class FormulaInstaller
def check_m4
# Check for m4 files
- if Dir[f.share+"aclocal/*.m4"].length > 0
+ if Dir[f.share+"aclocal/*.m4"].length > 0 and not in_aclocal_dirlist?
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"