Fix parsing of "-I foo" and "-L foo" under superenv

Fixes Homebrew/homebrew#24654.
This commit is contained in:
Jack Nagel 2013-11-26 21:39:38 -06:00
parent 85f424b270
commit 4584407425

View File

@ -130,11 +130,11 @@ class Cmd
whittler.next
when '-dylib'
args << "-Wl,#{arg}"
when /^-I(.+)/
# it is okay to add a space after the -I; so let's support it
when /^-I(.+)?/
# Support both "-Ifoo" (one argument) and "-I foo" (two arguments)
path = $1.chuzzle || whittler.next
args << "-I#{path}" if iset.add?(path.cleanpath)
when /^-L(.+)/
when /^-L(.+)?/
path = $1.chuzzle || whittler.next
doit = case path.cleanpath
when %r{^#{brewfix}}