diff options
| author | Jack Nagel | 2014-04-20 19:54:32 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-20 19:59:25 -0500 |
| commit | 7498cfff996c3eacdff0637614aaf59965b02cdf (patch) | |
| tree | af0f455f6afbfe63863748965ddcf1f11ea18be3 /Library/ENV | |
| parent | d1041319f401d1a3a559d551d7b6a89bc3f4ee0b (diff) | |
| download | brew-7498cfff996c3eacdff0637614aaf59965b02cdf.tar.bz2 | |
Remove to_flags monkeypatch
Diffstat (limited to 'Library/ENV')
| -rwxr-xr-x | Library/ENV/4.3/cc | 8 | ||||
| -rw-r--r-- | Library/ENV/libsuperenv.rb | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index d05e81074..9c1eeb23e 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -232,7 +232,7 @@ class Cmd syslibpath end def ldflags - args = libpath.to_flags('-L') + args = path_flags("-L", libpath) case mode when :ld then args << '-headerpad_max_install_names' when :ccld then args << '-Wl,-headerpad_max_install_names' @@ -247,7 +247,7 @@ class Cmd sys, opt = cpath # we want our keg-only includes to be found before system includes *and* # before any other includes the build-system adds - sys.to_flags('-isystem') + opt.to_flags('-I') + path_flags("-isystem", sys) + path_flags("-I", opt) end def make_fuss args return unless make_fuss? @@ -278,6 +278,10 @@ class Cmd path = path.realpath if path.exist? path.to_s end + def path_flags(prefix, paths) + paths = paths.uniq.select { |path| File.directory?(path) } + paths.map! { |path| prefix + path } + end end if __FILE__ == $PROGRAM_NAME diff --git a/Library/ENV/libsuperenv.rb b/Library/ENV/libsuperenv.rb index c6b8c1c4b..1b4ffa19d 100644 --- a/Library/ENV/libsuperenv.rb +++ b/Library/ENV/libsuperenv.rb @@ -13,9 +13,3 @@ class NilClass def chuzzle; end def split(x); [] end end - -class Array - def to_flags prefix - select { |path| File.directory? path }.uniq.map { |path| prefix + path } - end -end |
