diff options
Diffstat (limited to 'scons.1')
-rw-r--r-- | scons.1 | 97 |
1 files changed, 60 insertions, 37 deletions
@@ -19,9 +19,9 @@ .\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION .\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. .\" -.\" doc/man/scons.1 4720 2010/03/24 03:14:11 jars +.\" doc/man/scons.1 5023 2010/06/14 22:05:46 scons .\" -.TH SCONS 1 "March 2010" +.TH SCONS 1 "June 2010" .\" ES - Example Start - indents and turns off line fill .rm ES .de ES @@ -380,7 +380,7 @@ try to access a list member that does not exist. .B scons -requires Python version 1.5.2 or later. +requires Python version 2.4 or later. There should be no other dependencies or requirements to run .B scons. @@ -591,10 +591,9 @@ Print how many objects are created of the various classes used internally by SCons before and after reading the SConscript files and before and after building targets. -This is not supported when run under Python versions earlier than 2.1, -when SCons is executed with the Python +This is not supported when SCons is executed with the Python .B -O -(optimized) option, +(optimized) option or when the SCons modules have been compiled with optimization (that is, when executing from @@ -642,7 +641,6 @@ Prints a summary of hits and misses using the Memoizer, an internal subsystem that counts how often SCons uses cached values in memory instead of recomputing them each time they're needed. -Only available when using Python 2.2 or later. .TP --debug=memory @@ -658,7 +656,6 @@ A deprecated option preserved for backwards compatibility. --debug=objects Prints a list of the various objects of the various classes used internally by SCons. -This only works when run under Python 2.1 or later. .TP --debug=pdb @@ -1841,9 +1838,7 @@ and a same-named environment method that split a single string into a list, separated on strings of white-space characters. -(These are similar to the -string.split() method -from the standard Python library, +(These are similar to the split() member function of Python strings but work even if the input isn't a string.) Like all Python arguments, @@ -1862,7 +1857,7 @@ env.Program('bar', env.Split('bar.c foo.c')) env.Program(source = ['bar.c', 'foo.c'], target = 'bar') env.Program(target = 'bar', Split('bar.c foo.c')) env.Program(target = 'bar', env.Split('bar.c foo.c')) -env.Program('bar', source = string.split('bar.c foo.c')) +env.Program('bar', source = 'bar.c foo.c'.split()) .EE Target and source file names @@ -3094,7 +3089,7 @@ according to the suffix mappings in the .B SourceFileScanner object. See the section "Scanner Objects," -below, for a more information. +below, for more information. '\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .IP StaticLibrary() @@ -3188,7 +3183,7 @@ according to the suffix mappings in .B SourceFileScanner object. See the section "Scanner Objects," -below, for a more information. +below, for more information. '\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .IP Substfile() @@ -3494,11 +3489,13 @@ and Builders by adding them to the .B SourceFileScanner -object as follows: - +object. See the section "Scanner Objects," -below, for a more information about -defining your own Scanner objects. +below, for more information about +defining your own Scanner objects +and using the +.B SourceFileScanner +object. .SS Methods and Functions to Do Things In addition to Builder methods, @@ -3669,13 +3666,6 @@ method (with a few additional capabilities noted below); see the documentation for .B optparse for a thorough discussion of its option-processing capabities. -(Note that although the -.B optparse -module was not a standard module until Python 2.3, -.B scons -contains a compatible version of the module -that is used to provide identical functionality -when run by earlier Python versions.) In addition to the arguments and values supported by the .B optparse.add_option () @@ -4017,6 +4007,10 @@ is intended to be passed to the .B SourceCode function. +This function is deprecated. For details, see the entry for the +.B SourceCode +function. + Example: .ES @@ -4399,6 +4393,10 @@ replicate part of the repository directory hierarchy in your local build directory. +This function is deprecated. For details, see the entry for the +.B SourceCode +function. + Examples: .ES @@ -4966,7 +4964,7 @@ in the path specified by .IR dirs . .I dirs may be a list of directory names or a single directory name. -In addition to searching for files that exist in the filesytem, +In addition to searching for files that exist in the filesystem, this function also searches for derived files that have not yet been built. @@ -5950,6 +5948,10 @@ is intended to be passed to the .B SourceCode function. +This function is deprecated. For details, see the entry for the +.B SourceCode +function. + Example: .ES @@ -6065,7 +6067,7 @@ will overwrite itself on a display: .ES import sys -class ProgressCounter: +class ProgressCounter(object): count = 0 def __call__(self, node, *args, **kw): self.count += 100 @@ -6243,6 +6245,10 @@ is intended to be passed to the .B SourceCode function: +This function is deprecated. For details, see the entry for the +.B SourceCode +function. + Examples: .ES @@ -6411,6 +6417,10 @@ is intended to be passed to the .B SourceCode function. +This function is deprecated. For details, see the entry for the +.B SourceCode +function. + Example: .ES @@ -6723,7 +6733,7 @@ The default is to use a custom .B SCons.dblite module that uses pickled Python data structures, -and which works on all Python versions from 1.5.2 on. +and which works on all Python versions. Examples: @@ -6755,7 +6765,7 @@ The following statements are equivalent: .ES env.SetDefault(FOO = 'foo') -if not env.has_key('FOO'): env['FOO'] = 'foo' +if 'FOO' not in env: env['FOO'] = 'foo' .EE '\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -6869,6 +6879,13 @@ function. .RI SourceCode( entries ", " builder ) .TP .RI env.SourceCode( entries ", " builder ) +This function and its associate factory functions are deprecated. +There is no replacement. +The intended use was to keep a local tree in sync with an archive, +but in actuality the function only causes the archive +to be fetched on the first run. +Synchronizing with the archive is best done external to SCons. + Arrange for non-existent source files to be fetched from a source code management system using the specified @@ -7057,6 +7074,10 @@ source_nodes = env.subst('$EXPAND_TO_NODELIST', '\"directory hierarchy in your '\"local build directory. '\" +'\"This function is deprecated. For details, see the entry for the +'\".B SourceCode +'\"function. +'\" '\"Example: '\" '\".ES @@ -11628,10 +11649,9 @@ is compressed or not. The default value is .BR zipfile.ZIP_DEFLATED , which creates a compressed zip archive. -This value has no effect when using Python 1.5.2 -or if the +This value has no effect if the .B zipfile -module is otherwise unavailable. +module is unavailable. .IP ZIPCOMSTR The string displayed when archiving files @@ -12435,7 +12455,7 @@ vars.Add('CC', 'The C compiler') def validate_color(key, val, env): if not val in ['red', 'blue', 'yellow']: - raise "Invalid color value '%s'" % val + raise Exception("Invalid color value '%s'" % val) vars.Add('COLOR', validator=valid_color) .EE @@ -13046,7 +13066,7 @@ may be indicated by a dictionary entry with a key value of None. .P .ES -b = Builder("build_it < $SOURCE > $TARGET" +b = Builder("build_it < $SOURCE > $TARGET", prefix = "file-") def gen_prefix(env, sources): @@ -14299,7 +14319,7 @@ be associated with the instantiation of the class: .ES -class foo: +class foo(object): def __init__(self, arg): self.arg = arg @@ -14422,7 +14442,9 @@ You can use the function to define objects to scan new file types for implicit dependencies. -Scanner accepts the following arguments: +The +.B Scanner +function accepts the following arguments: .IP function This can be either: @@ -14573,6 +14595,7 @@ that should be scanned recursively; this can be used to select a specific subset of Nodes for additional scanning. +.RE Note that .B scons has a global @@ -14941,7 +14964,7 @@ as follows: def pf(env, dir, target, source, arg): top_dir = Dir('#').abspath results = [] - if env.has_key('MYPATH'): + if 'MYPATH' in env: for p in env['MYPATH']: results.append(top_dir + os.sep + p) return results |