summaryrefslogtreecommitdiffstats
path: root/doc/user/ENV.in
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user/ENV.in')
-rw-r--r--doc/user/ENV.in42
1 files changed, 41 insertions, 1 deletions
diff --git a/doc/user/ENV.in b/doc/user/ENV.in
index 3fc3a29..b1edd81 100644
--- a/doc/user/ENV.in
+++ b/doc/user/ENV.in
@@ -1,7 +1,7 @@
<!--
- Copyright (c) 2001, 2002, 2003 Steven Knight
+ __COPYRIGHT__
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -80,6 +80,46 @@
env = Environment(ENV = {'PATH' : path})
</sconstruct>
+ <para>
+
+ Assign a dictionary to the &ENV;
+ construction variable in this way
+ completely resets the external environment
+ so that the only variable that will be
+ set when external commands are executed
+ will be the &PATH; value.
+ If you want to use the rest of
+ the values in &ENV; and only
+ set the value of &PATH;,
+ the most straightforward way is probably:
+
+ </para>
+
+ <sconstruct>
+ env['ENV']['PATH'] = ['/usr/local/bin', '/bin', '/usr/bin']
+ </sconstruct>
+
+ <para>
+
+ Note that &SCons; does allow you to define
+ the directories in the &PATH; in a string,
+ separated by the pathname-separator character
+ for your system (':' on POSIX systems, ';' on Windows):
+
+ </para>
+
+ <sconstruct>
+ env['ENV']['PATH'] = '/usr/local/bin:/bin:/usr/bin'
+ </sconstruct>
+
+ <para>
+
+ But doing so makes your &SConscript; file less portable,
+ (although in this case that may not be a huge concern
+ since the directories you list are likley system-specific, anyway).
+
+ </para>
+
<!--
<scons_example name="ex1">