diff options
| author | Felix Buenemann | 2011-11-16 22:44:38 +0100 |
|---|---|---|
| committer | Jack Nagel | 2012-01-01 23:15:31 -0600 |
| commit | e1ab74e879dbae60c52559e765991a092a5f1845 (patch) | |
| tree | fdba98215b3318a1d6a33b0681bd3eec2b36d048 /Library | |
| parent | 858794473ed52967c97835deb5a1342c61e1e2f2 (diff) | |
| download | homebrew-e1ab74e879dbae60c52559e765991a092a5f1845.tar.bz2 | |
Omit check_m4 warning when appropriate
If the suggested modifications are already in place, just skip the
warning.
Closes #8624.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 8 |
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" |
