From bb29989cac62aaf1486b31ac2bfd5e44f2feaa0e Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 6 Nov 2006 14:23:58 +0100 Subject: [PATCH] obey inheritenv variable on scons command-line (patch from Gustavo Carneiro) --- build.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index 461e5d8f9..cc509519a 100644 --- a/build.py +++ b/build.py @@ -299,7 +299,11 @@ class Ns3: outfile.write('#endif /*' + config_file_guard + '*/\n') config.Finish() def generate_dependencies(self): - env = Environment() + inheritenv = (ARGUMENTS.get('inheritenv', 'n') in 'yY1') + if inheritenv: + env = Environment(ENV=os.environ) + else: + env = Environment() self.gen_mod_config(env) cc = env['CC'] cxx = env.subst(env['CXX'])