diff options
| author | Jack Nagel | 2013-11-21 14:50:35 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-11-21 17:17:56 -0600 |
| commit | ce5f4ad4dfc99f5f058ec724136c226ecabaf7d8 (patch) | |
| tree | 5d4d46d42143b4a25b123d1df57220da1a62342f /Library/ENV | |
| parent | a40a0e1862b134f5282eb4487444566ac7fb88ba (diff) | |
| download | brew-ce5f4ad4dfc99f5f058ec724136c226ecabaf7d8.tar.bz2 | |
Move some global methods into the context in which they used
Diffstat (limited to 'Library/ENV')
| -rwxr-xr-x | Library/ENV/4.3/cc | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index 7a40d2e38..b29acb64d 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -24,20 +24,6 @@ end LOGGER = Logger.new -def cccfg? flags - flags.split('').all?{|c| ENV['HOMEBREW_CCCFG'].include? c } if ENV['HOMEBREW_CCCFG'] -end -def nclt? - $sdkroot != nil -end -def syspath - if nclt? - %W{#$sdkroot/usr #$sdkroot/usr/local} - else - %W{/usr /usr/local} - end -end - class Cmd def initialize path, args @arg0 = File.basename(path).freeze @@ -192,6 +178,13 @@ class Cmd args.concat ENV['HOMEBREW_ARCHFLAGS'].split(' ') if cccfg? 'u' args end + def syspath + if nclt? + %W{#$sdkroot/usr #$sdkroot/usr/local} + else + %W{/usr /usr/local} + end + end def syslibpath # We reject brew's lib as we explicitly add this as a -L flag, thus it # is given higher priority by cc, so it surpasses the system libpath. @@ -249,6 +242,12 @@ class Cmd # configure scripts generated with autoconf 2.61 or later export as_nl ENV.key? 'as_nl' end + def nclt? + $sdkroot != nil + end + def cccfg? flags + flags.split('').all?{|c| ENV['HOMEBREW_CCCFG'].include? c } if ENV['HOMEBREW_CCCFG'] + end end if __FILE__ == $PROGRAM_NAME |
