merge
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 04 Dec 2006 13:51:42 +0100
changeset 179 0519ba9a919f
parent 178 78e2db8d8128 (current diff)
parent 141 5f92897efe08 (diff)
child 180 3e6bfa625fb7
merge
BUILD
--- a/BUILD	Mon Dec 04 13:49:28 2006 +0100
+++ b/BUILD	Mon Dec 04 13:51:42 2006 +0100
@@ -34,6 +34,10 @@
   behalf of the user will use doubles. By default, the code
   uses 128 integers.
 Example: scons high-precision-as-double=y
+- 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
 ----------
@@ -136,7 +140,7 @@
 # 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
--- a/build.py	Mon Dec 04 13:49:28 2006 +0100
+++ b/build.py	Mon Dec 04 13:51:42 2006 +0100
@@ -299,7 +299,11 @@
                     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'])