Apply the same filtering to -I paths as -L paths
This commit is contained in:
parent
b745d21912
commit
2e22465aa4
@ -134,10 +134,19 @@ class Cmd
|
|||||||
when /^-I(.+)?/
|
when /^-I(.+)?/
|
||||||
# Support both "-Ifoo" (one argument) and "-I foo" (two arguments)
|
# Support both "-Ifoo" (one argument) and "-I foo" (two arguments)
|
||||||
path = $1.chuzzle || whittler.next
|
path = $1.chuzzle || whittler.next
|
||||||
args << "-I#{path}" if iset.add?(path.cleanpath)
|
args << "-I#{path}" if keep?(path) and iset.add?(path.cleanpath)
|
||||||
when /^-L(.+)?/
|
when /^-L(.+)?/
|
||||||
path = $1.chuzzle || whittler.next
|
path = $1.chuzzle || whittler.next
|
||||||
doit = case path.cleanpath
|
args << "-L#{path}" if keep?(path) and lset.add?(path.cleanpath)
|
||||||
|
else
|
||||||
|
args << arg
|
||||||
|
end
|
||||||
|
end
|
||||||
|
args
|
||||||
|
end
|
||||||
|
|
||||||
|
def keep? path
|
||||||
|
case path.cleanpath
|
||||||
when %r{^#{Regexp.escape(brewfix)}}, %r{^#{Regexp.escape(brewtmp)}}
|
when %r{^#{Regexp.escape(brewfix)}}, %r{^#{Regexp.escape(brewtmp)}}
|
||||||
# maybe homebrew is installed to /sw or /opt/brew
|
# maybe homebrew is installed to /sw or /opt/brew
|
||||||
true
|
true
|
||||||
@ -146,13 +155,8 @@ class Cmd
|
|||||||
else
|
else
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
args << "-L#{path}" if doit and lset.add?(path.cleanpath)
|
|
||||||
else
|
|
||||||
args << arg
|
|
||||||
end
|
|
||||||
end
|
|
||||||
args
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def cflags
|
def cflags
|
||||||
args = []
|
args = []
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user