summaryrefslogtreecommitdiffstats
path: root/doc/user/ENV.sgml
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-08-16 13:43:09 (GMT)
committerSteven Knight <knight@baldmt.com>2004-08-16 13:43:09 (GMT)
commit74e2a97dc2ed0412ffb1a9c6dc810c1a1c4a4e67 (patch)
tree82a4927ce94fa90b9798accd2cfdbffb88ab2d51 /doc/user/ENV.sgml
parent9a0aa47145dbaa02eccac8ba23c498a4e2a3a098 (diff)
downloadSCons-74e2a97dc2ed0412ffb1a9c6dc810c1a1c4a4e67.zip
SCons-74e2a97dc2ed0412ffb1a9c6dc810c1a1c4a4e67.tar.gz
SCons-74e2a97dc2ed0412ffb1a9c6dc810c1a1c4a4e67.tar.bz2
Branch for documentation changes.
Diffstat (limited to 'doc/user/ENV.sgml')
-rw-r--r--doc/user/ENV.sgml42
1 files changed, 41 insertions, 1 deletions
diff --git a/doc/user/ENV.sgml b/doc/user/ENV.sgml
index d3078f1..c2d7296 100644
--- a/doc/user/ENV.sgml
+++ b/doc/user/ENV.sgml
@@ -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})
</programlisting>
+ <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>
+
+ <programlisting>
+ env['ENV']['PATH'] = ['/usr/local/bin', '/bin', '/usr/bin']
+ </programlisting>
+
+ <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>
+
+ <programlisting>
+ env['ENV']['PATH'] = '/usr/local/bin:/bin:/usr/bin'
+ </programlisting>
+
+ <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">