diff options
author | Steven Knight <knight@baldmt.com> | 2005-08-15 13:39:14 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-08-15 13:39:14 (GMT) |
commit | 2c8bdd2a8cfa630e66e5b66fce0d24a3fe796c14 (patch) | |
tree | e5d7e21a8b69a397a9a6abfd04cb117c5dd06773 | |
parent | 1923dc337f9f98c3e08b95654dea4b34084c6302 (diff) | |
download | SCons-2c8bdd2a8cfa630e66e5b66fce0d24a3fe796c14.zip SCons-2c8bdd2a8cfa630e66e5b66fce0d24a3fe796c14.tar.gz SCons-2c8bdd2a8cfa630e66e5b66fce0d24a3fe796c14.tar.bz2 |
Documentation fixes.
Improve man page explanation of impact of not having external environment variables automatically imported. Fix cut-and-paste errors in descriptions of AppendENVPath() and Prepend(). Correct the __doc__ string for get_visualstudio_versions().
-rw-r--r-- | doc/man/scons.1 | 26 | ||||
-rw-r--r-- | src/engine/SCons/Tool/msvs.py | 10 |
2 files changed, 29 insertions, 7 deletions
diff --git a/doc/man/scons.1 b/doc/man/scons.1 index 96bd467..14a0bf2 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -149,6 +149,28 @@ import os env = Environment(ENV = {'PATH' : os.environ['PATH']}) .EE +Similarly, if the commands use external environment variables +like $PATH, $HOME, $JAVA_HOME, $LANG, $SHELL, $TERM, etc., +these variables can also be explicitly propagated: + +.ES +import os +env = Environment(ENV = {'PATH' : os.environ['PATH'], + 'HOME' : os.environ['HOME']}) +.EE + +Or you may explicitly propagate the invoking user's +complete external environment: + +.ES +import os +env = Environment(ENV = os.environ['PATH']) +.EE + +This comes at the expense of making your build +dependent on the user's environment being set correctly, +but it may be more convenient for many configurations. + .B scons can scan known input files automatically for dependency information (for example, #include statements @@ -2537,7 +2559,7 @@ Example: .ES print 'before:',env['ENV']['INCLUDE'] include_path = '/foo/bar:/foo' -env.PrependENVPath('INCLUDE', include_path) +env.AppendENVPath('INCLUDE', include_path) print 'after:',env['ENV']['INCLUDE'] yields: @@ -3716,7 +3738,7 @@ after: /foo/bar:/foo:/biz '\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .TP -.RI env.AppendUnique( key = val ", [...])" +.RI env.PrependUnique( key = val ", [...])" Appends the specified keyword arguments to the beginning of construction variables in the environment. If the Environment does not have diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py index e03eb8d..90b756c 100644 --- a/src/engine/SCons/Tool/msvs.py +++ b/src/engine/SCons/Tool/msvs.py @@ -765,11 +765,11 @@ def get_default_visualstudio_version(env): def get_visualstudio_versions(): """ - Get list of visualstudio versions from the Windows registry. Return a - list of strings containing version numbers; an exception will be raised - if we were unable to access the registry (eg. couldn't import - a registry-access module) or the appropriate registry keys weren't - found. + Get list of visualstudio versions from the Windows registry. + Returns a list of strings containing version numbers. An empty list + is returned if we were unable to accees the register (for example, + we couldn't import the registry-access module) or the appropriate + registry keys weren't found. """ if not SCons.Util.can_read_reg: |