diff options
| author | Xiyue Deng | 2013-10-12 05:23:06 -0700 |
|---|---|---|
| committer | Xiyue Deng | 2013-10-18 13:11:50 -0700 |
| commit | 3b66a7d4fd41947f8c2a472a0dfe7afa840c93cf (patch) | |
| tree | 3be499aac09e2e20a9dbaed41fb6019118b95e3a /Library | |
| parent | f2738dbe960312bbd6514eeb6ff82547781ae839 (diff) | |
| download | brew-3b66a7d4fd41947f8c2a472a0dfe7afa840c93cf.tar.bz2 | |
Improve superenv add/remove message.
* Now it includes all flags that are added or removed by superenv when
passing "--verbose" or envvar VERBOSE or HOMEBREW_VERBOSE is set.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/ENV/4.3/cc | 8 | ||||
| -rwxr-xr-x | Library/brew.rb | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index 8075017d8..bef8b8c41 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -86,7 +86,7 @@ class Cmd else args << "-syslibroot" << $sdkroot end if nclt? - case mode + allflags = case mode when :ccld cflags + args + cppflags + ldflags when :cc @@ -98,6 +98,8 @@ class Cmd when :ld ldflags + args end.compact + make_fuss(allflags) if verbose? + allflags end def refurbished_args lset = Set.new(libpath + syslibpath) @@ -148,7 +150,6 @@ class Cmd args << arg end end - make_fuss(args) args end def cflags @@ -220,6 +221,9 @@ class Cmd STDERR.puts "brew: superenv deduped: #{dups}" unless dups.empty? STDERR.puts "brew: superenv added: #{adds*' '}" unless adds.empty? end + def verbose? + !ENV['VERBOSE'].nil? || !ENV['HOMEBREW_VERBOSE'].nil? + end end if __FILE__ == $PROGRAM_NAME diff --git a/Library/brew.rb b/Library/brew.rb index b72d61494..f4bef15d8 100755 --- a/Library/brew.rb +++ b/Library/brew.rb @@ -58,6 +58,8 @@ end begin trap("INT", std_trap) # restore default CTRL-C handler + ENV['HOMEBREW_VERBOSE'] = "1" if ARGV.verbose? + aliases = {'ls' => 'list', 'homepage' => 'home', '-S' => 'search', |
