From bb29989cac62aaf1486b31ac2bfd5e44f2feaa0e Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 6 Nov 2006 14:23:58 +0100 Subject: [PATCH 1/3] 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']) From 48c5381ac1fee9f93d35afb74e0e0095f5bd2662 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 6 Nov 2006 14:25:35 +0100 Subject: [PATCH 2/3] add documentation for the inheritenv option --- BUILD | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BUILD b/BUILD index 9a2eadc22..15e952e57 100644 --- a/BUILD +++ b/BUILD @@ -29,6 +29,10 @@ Example: scons cflags="-O3 -ffast-math" Example: scons cxxflags="-O3 -ffast-math" - ldflags: flags for the linker: Example: scons ldflags="-L/foo -L/bar" +- inheritenv: set to 'y' if you want to make your compiler + execute within the same environment (env vars) as your own + shell. This is typically used to make colorgcc work. +Example: scons inheritenv=y 2) Targets ---------- From a499791366e5f0224d9914400807c28e65608ed9 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Thu, 16 Nov 2006 12:04:36 +0100 Subject: [PATCH 3/3] patch to build documentation from paul@cravenfamily.com --- BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD b/BUILD index 15e952e57..ff139ca7e 100644 --- a/BUILD +++ b/BUILD @@ -135,7 +135,7 @@ core.add_inst_headers ('foo.h') # create a new module. First arg is the name of # the new module. Second arg is the directory in # which all source files for this module reside. -my_module = Ns3Module ('my', 'src/my_dir') +my_module = build.Ns3Module ('my', 'src/my_dir') # add it to build system ns3.add (my_module) # specify module dependencies. Here, depends