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.
This commit is contained in:
		
							parent
							
								
									f2738dbe96
								
							
						
					
					
						commit
						3b66a7d4fd
					
				@ -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
 | 
			
		||||
 | 
			
		||||
@ -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',
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user