diff options
author | Steven Knight <knight@baldmt.com> | 2003-04-10 06:37:27 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-04-10 06:37:27 (GMT) |
commit | 37487bfb58def3b8d05d964ab40fdff8b8ed4b0d (patch) | |
tree | ba12cc1001d7ac0445991849a651e858dcc98324 /doc/man | |
parent | 2f8be7360679ad5e0260f4965ea5dd9506c7b033 (diff) | |
download | SCons-37487bfb58def3b8d05d964ab40fdff8b8ed4b0d.zip SCons-37487bfb58def3b8d05d964ab40fdff8b8ed4b0d.tar.gz SCons-37487bfb58def3b8d05d964ab40fdff8b8ed4b0d.tar.bz2 |
Options save. (Allen Bierbaum)
Diffstat (limited to 'doc/man')
-rw-r--r-- | doc/man/scons.1 | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/doc/man/scons.1 b/doc/man/scons.1 index a3f35af..09de821 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -2863,11 +2863,11 @@ command line or a text-based SConscript file through an Options object. To create an Options object, call the Options() function: .TP -.RI Options([ file ]) +.RI Options([ files ]) This creates an Options object that will read construction variables from -the filename based in the -.I file -argument. If no filename is given, then no file will be read. Example: +the file or list of filenames given in the +.I files +argument. If no files are given, then no files will be read. Example: .ES opts = Options('custom.py') @@ -2885,8 +2885,8 @@ is the help text for the variable. .I default is the default value of the variable. .I validater -is called to validate the value of the variable, and should take two -arguments: key and value. +is called to validate the value of the variable, and should take three +arguments: key, value, and environment .I converter is called to convert the value before putting it in the environment, and should take a single argument: value. Example: @@ -2908,6 +2908,22 @@ env = Environment(options=opts) .EE .TP +.RI Save( filename ", " env ) +This saves the currently set options into a script file named +.I filename +that can be used on the next invocation to automatically load the current +settings. This method combined with the Options method can be used to +support caching of options between runs. + +.ES +env = Environment() +opts = Options(['options.cache', 'custom.py']) +opts.Add(...) +opts.Update(env) +opts.Save('options.cache', env) +.EE + +.TP .RI GenerateHelpText( env ) This generates help text documenting the customizable construction variables suitable to passing in to the Help() function. |