Browse Source

Allow the environment to override certain flags.

tags/7.8-rc1
Alan Hourihane 15 years ago
parent
commit
6544be6223
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      SConstruct

+ 11
- 0
SConstruct View File

@@ -59,6 +59,17 @@ env = Environment(
ENV = os.environ,
)

if os.environ.has_key('CC'):
env['CC'] = os.environ['CC']
if os.environ.has_key('CFLAGS'):
env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
if os.environ.has_key('CXX'):
env['CXX'] = os.environ['CXX']
if os.environ.has_key('CXXFLAGS'):
env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
if os.environ.has_key('LDFLAGS'):
env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])

Help(opts.GenerateHelpText(env))

# replicate options values in local variables

Loading…
Cancel
Save