diff options
Diffstat (limited to 'doc/user/environments.in')
-rw-r--r-- | doc/user/environments.in | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/doc/user/environments.in b/doc/user/environments.in index 9ce5568..ecfea8a 100644 --- a/doc/user/environments.in +++ b/doc/user/environments.in @@ -1,6 +1,6 @@ <!-- - Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation + Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -347,7 +347,7 @@ environment, of directory names, suffixes, etc. The <literal>external environment</literal> is the set of variables in the user's environment - at the time the user runs &SCons. + at the time the user runs &SCons;. These variables are available within the &SConscript; files through the Python <literal>os.environ</literal> dictionary. See <xref linkend="sect-external-environments"></xref>, below. @@ -406,7 +406,7 @@ environment, of directory names, suffixes, etc. Unlike &Make;, &SCons; does not automatically copy or import values between different environments - (with the exception of explicit clones of &consenvs, + (with the exception of explicit clones of &consenvs;, which inherit values from their parent). This is a deliberate design choice to make sure that builds are, @@ -638,7 +638,7 @@ environment, of directory names, suffixes, etc. for key in ['OBJSUFFIX', 'LIBSUFFIX', 'PROGSUFFIX']: print "key = %s, value = %s" % (key, dict[key]) </file> - </scons_Example> + </scons_example> <para> @@ -779,18 +779,20 @@ environment, of directory names, suffixes, etc. If a problem occurs when expanding a construction variable, by default it is expanded to <literal>''</literal> (a null string), and will not cause scons to fail. - + </para> + <scons_example name="missing1"> <file name="SConstruct" printme="1"> env = Environment() - print "value is:", env.subst( '->$MISSING<-' ) + print "value is:", env.subst( '->$MISSING<-' ) </file> </scons_example> <scons_output example="missing1"> <scons_output_command>scons -Q</scons_output_command> </scons_output> - + + <para> This default behaviour can be changed using the &AllowSubstExceptions; function. When a problem occurs with a variable expansion it generates @@ -810,7 +812,7 @@ environment, of directory names, suffixes, etc. <file name="SConstruct" printme="1"> AllowSubstExceptions() env = Environment() - print "value is:", env.subst( '->$MISSING<-' ) + print "value is:", env.subst( '->$MISSING<-' ) </file> </scons_example> @@ -830,7 +832,7 @@ environment, of directory names, suffixes, etc. <file name="SConstruct" printme="1"> AllowSubstExceptions(IndexError, NameError, ZeroDivisionError) env = Environment() - print "value is:", env.subst( '->${1 / 0}<-' ) + print "value is:", env.subst( '->${1 / 0}<-' ) </file> </scons_example> @@ -1093,7 +1095,7 @@ environment, of directory names, suffixes, etc. </section> - <section> + <section id="sect-clone-environments"> <title>Making Copies of &ConsEnvs;: the &Clone; Method</title> <para> |