Skip to content
Snippets Groups Projects
Commit 3b66a7d4 authored by Xiyue Deng's avatar Xiyue Deng
Browse files

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.
parent f2738dbe
No related branches found
No related tags found
No related merge requests found
...@@ -86,7 +86,7 @@ class Cmd ...@@ -86,7 +86,7 @@ class Cmd
else else
args << "-syslibroot" << $sdkroot args << "-syslibroot" << $sdkroot
end if nclt? end if nclt?
case mode allflags = case mode
when :ccld when :ccld
cflags + args + cppflags + ldflags cflags + args + cppflags + ldflags
when :cc when :cc
...@@ -98,6 +98,8 @@ class Cmd ...@@ -98,6 +98,8 @@ class Cmd
when :ld when :ld
ldflags + args ldflags + args
end.compact end.compact
make_fuss(allflags) if verbose?
allflags
end end
def refurbished_args def refurbished_args
lset = Set.new(libpath + syslibpath) lset = Set.new(libpath + syslibpath)
...@@ -148,7 +150,6 @@ class Cmd ...@@ -148,7 +150,6 @@ class Cmd
args << arg args << arg
end end
end end
make_fuss(args)
args args
end end
def cflags def cflags
...@@ -220,6 +221,9 @@ class Cmd ...@@ -220,6 +221,9 @@ class Cmd
STDERR.puts "brew: superenv deduped: #{dups}" unless dups.empty? STDERR.puts "brew: superenv deduped: #{dups}" unless dups.empty?
STDERR.puts "brew: superenv added: #{adds*' '}" unless adds.empty? STDERR.puts "brew: superenv added: #{adds*' '}" unless adds.empty?
end end
def verbose?
!ENV['VERBOSE'].nil? || !ENV['HOMEBREW_VERBOSE'].nil?
end
end end
if __FILE__ == $PROGRAM_NAME if __FILE__ == $PROGRAM_NAME
......
...@@ -58,6 +58,8 @@ end ...@@ -58,6 +58,8 @@ end
begin begin
trap("INT", std_trap) # restore default CTRL-C handler trap("INT", std_trap) # restore default CTRL-C handler
ENV['HOMEBREW_VERBOSE'] = "1" if ARGV.verbose?
aliases = {'ls' => 'list', aliases = {'ls' => 'list',
'homepage' => 'home', 'homepage' => 'home',
'-S' => 'search', '-S' => 'search',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment