This tells
.B scons
to export a list of variables from the current
-SConscript file to all other SConscript files. The exported variables
-are kept in a global collection, so subsequent exports
+SConscript file to all other SConscript files.
+The exported variables are kept in a global collection,
+so subsequent calls to
+.BR Export ()
will over-write previous exports that have the same name.
Multiple variable names should be passed to
.BR Export ()
as separate arguments. Examples:
.ES
+env = Environment()
+# Make env available for all SConscript files to Import().
Export("env")
-Export("env", "variable")
+
+package = 'my_name'
+# Make env and package available for all SConscript files to Import().
+Export("env", "package")
.EE
+.IP
+Note that the
+.BR SConscript ()
+function supports an
+.I exports
+argument that makes it easier to to export a variable or
+set of variables to a single SConscript file.
+See the description of the
+.BR SConscript ()
+function, below.
+
.TP
.RI File( name ", [" directory ])
This returns an object that represents a given file
.B scons
to execute
.I script
-as a SConscript (configuration) file. The optional
+as a SConscript (configuration) file.
+
+The optional
.I exports
argument provides a list of variable names to export to
.IR script ". "
+These variables are locally exported only to the specified
+.IR script ,
+and do not affect the
+global pool of variables used by
+the
+.BR Export ()
+function.
+'\"If multiple dirs are provided,
+'\"each script gets a fresh export.
+The subsidiary
.I script
-must use the
+file must use the
.BR Import ()
function to import the variables.
.IR duplicate =1,
but it may cause build problems in certain end-cases,
such as compiling from source files that
-are generated by the build.
+are generated by the build.)
Any variables returned by
.I script
Examples:
.ES
-SConscript('dir/SConscript')
-foo = SConscript('subdir/SConscript', "env")
+SConscript('subdir/SConscript')
+foo = SConscript('sub/SConscript', exports='env')
+SConscript('dir/SConscript', exports=['env', 'variable'])
SConscript('src/SConscript', build_dir='build', duplicate=0)
+SConscript('bld/SConscript', src_dir='src', exports='env')
.EE
.TP