diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/man/scons.1 | 90 | ||||
-rw-r--r-- | doc/user/libraries.in | 2 | ||||
-rw-r--r-- | doc/user/libraries.sgml | 2 |
3 files changed, 89 insertions, 5 deletions
diff --git a/doc/man/scons.1 b/doc/man/scons.1 index c0b91ec..769cfc2 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -586,7 +586,15 @@ 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 only works when run under Python 2.1 or later. +This is not supported when run under Python versions earlier than 2.1, +when SCons is executed with the Python +.B -O +(optimized) option, +or when the SCons modules +have been compiled with optimization +(that is, when executing from +.B *.pyo +files). .TP --debug=dtree @@ -2027,6 +2035,84 @@ env.other_method_name('another arg') .EE '\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.TP +.RI AddOption( arguments ) +This function adds a new command-line option to be recognized. +The specified +.I arguments +are the same as supported by the standard Python +.B optparse.add_option +method; +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.) + +If no +.B default= +keyword argument is supplied when calling +.BR AddOption (), +the option will have a default value of +.BR None . + +Once a new command-line option has been added with +.BR AddOption (), +the option value may be accessed using +.BR GetOption () +or +.BR env.GetOption (). +The value may also be set, using +.BR SetOption () +or +.BR env.SetOption (), +if conditions in a +.B SConscript +require overriding any default value. +Note, however, that a +value specified on the command line will +.I always +override a value set by any SConscript file. + +Any specified +.B help= +strings for the new option(s) +will be displayed by the +.B -H +or +.B -h +options +(the latter only if no other help text is +specified in the SConscript files). +The help text for the local options specified by +.BR AddOption () +will appear below the SCons options themselves, +under a separate +.B "Local Options" +heading. +The options will appear in the help text +in the order in which the +.BR AddOption () +calls occur. + +Example: + +.ES +AddOption('--prefix', + dest='prefix', + nargs=1, type='string', + action='store', + metavar='DIR', + help='installation prefix') +env = Environment(PREFIX = GetOption('prefix')) +.EE + +'\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .TP .RI AddPostAction( target ", " action ) .TP @@ -4110,6 +4196,8 @@ which corresponds to -h and --help; which corresponds to --implicit-cache; .B max_drift which corresponds to --max-drift; +.B no_exec +which corresponds to -n, --no-exec, --just-print, --dry-run and --recon; .B num_jobs which corresponds to -j and --jobs. .B random diff --git a/doc/user/libraries.in b/doc/user/libraries.in index 9a12062..0fe53b8 100644 --- a/doc/user/libraries.in +++ b/doc/user/libraries.in @@ -108,8 +108,6 @@ </para> - <para> - <scons_example name="objects" printme="1"> <file name="SConstruct" printme="1"> Library('foo', ['f1.c', 'f2.o', 'f3.c', 'f4.o']) diff --git a/doc/user/libraries.sgml b/doc/user/libraries.sgml index 96814a7..772810f 100644 --- a/doc/user/libraries.sgml +++ b/doc/user/libraries.sgml @@ -106,8 +106,6 @@ </para> - <para> - <programlisting> Library('foo', ['f1.c', 'f2.o', 'f3.c', 'f4.o']) </programlisting> |