From 56337453f0f3fbe34255e636d5d65974f4d17681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 7 Oct 2019 17:50:28 +0200 Subject: New upstream version 3.1.1 --- doc/generated/examples/caching_ex-random_1.xml | 4 +- doc/generated/examples/troubleshoot_Dump_1.xml | 1 + doc/generated/examples/troubleshoot_Dump_2.xml | 3 +- doc/generated/examples/troubleshoot_explain1_3.xml | 2 +- .../examples/troubleshoot_stacktrace_2.xml | 4 +- doc/generated/functions.gen | 51 ++++++++++++---------- doc/generated/tools.gen | 12 ++--- doc/generated/tools.mod | 4 +- doc/generated/variables.gen | 24 +++++----- doc/generated/variables.mod | 4 +- doc/man/scons-time.xml | 4 +- doc/man/scons.xml | 4 +- doc/man/sconsign.xml | 4 +- doc/user/builders-writing.xml | 21 ++++----- 14 files changed, 74 insertions(+), 68 deletions(-) (limited to 'doc') diff --git a/doc/generated/examples/caching_ex-random_1.xml b/doc/generated/examples/caching_ex-random_1.xml index 58ff6ae..d484ca4 100644 --- a/doc/generated/examples/caching_ex-random_1.xml +++ b/doc/generated/examples/caching_ex-random_1.xml @@ -1,9 +1,9 @@ % scons -Q +cc -o f4.o -c f4.c cc -o f3.o -c f3.c -cc -o f2.o -c f2.c cc -o f5.o -c f5.c +cc -o f2.o -c f2.c cc -o f1.o -c f1.c -cc -o f4.o -c f4.c cc -o prog f1.o f2.o f3.o f4.o f5.o diff --git a/doc/generated/examples/troubleshoot_Dump_1.xml b/doc/generated/examples/troubleshoot_Dump_1.xml index 99d1399..99518c0 100644 --- a/doc/generated/examples/troubleshoot_Dump_1.xml +++ b/doc/generated/examples/troubleshoot_Dump_1.xml @@ -57,6 +57,7 @@ scons: Reading SConscript files ... 'TARGET_ARCH': None, 'TARGET_OS': None, 'TEMPFILE': <class 'SCons.Platform.TempFileMunge'>, + 'TEMPFILEARGJOIN': ' ', 'TEMPFILEPREFIX': '@', 'TOOLS': ['install', 'install'], '_CPPDEFFLAGS': '${_defines(CPPDEFPREFIX, CPPDEFINES, CPPDEFSUFFIX, __env__)}', diff --git a/doc/generated/examples/troubleshoot_Dump_2.xml b/doc/generated/examples/troubleshoot_Dump_2.xml index e8e0960..d83fb94 100644 --- a/doc/generated/examples/troubleshoot_Dump_2.xml +++ b/doc/generated/examples/troubleshoot_Dump_2.xml @@ -80,7 +80,7 @@ scons: Reading SConscript files ... 'SHCXX': '$CXX', 'SHCXXCOM': '${TEMPFILE("$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM","$SHCXXCOMSTR")}', 'SHCXXFLAGS': ['$CXXFLAGS'], - 'SHELL': None, + 'SHELL': 'command', 'SHLIBPREFIX': '', 'SHLIBSUFFIX': '.dll', 'SHOBJPREFIX': '$OBJPREFIX', @@ -90,6 +90,7 @@ scons: Reading SConscript files ... 'TARGET_ARCH': None, 'TARGET_OS': None, 'TEMPFILE': <class 'SCons.Platform.TempFileMunge'>, + 'TEMPFILEARGJOIN': '\n', 'TEMPFILEPREFIX': '@', 'TOOLS': ['msvc', 'install', 'install'], '_CCCOMCOM': '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS $CCPCHFLAGS $CCPDBFLAGS', diff --git a/doc/generated/examples/troubleshoot_explain1_3.xml b/doc/generated/examples/troubleshoot_explain1_3.xml index 04b09fd..ed8f6d9 100644 --- a/doc/generated/examples/troubleshoot_explain1_3.xml +++ b/doc/generated/examples/troubleshoot_explain1_3.xml @@ -3,5 +3,5 @@ cp file.in file.oout scons: warning: Cannot find target file.out after building -File "/home/bdeegan/devel/scons/git/as_scons/bootstrap/src/script/scons.py", line 204, in <module> +File "/Users/bdbaddog/devel/scons/git/as_scons/src/script/scons.py", line 204, in <module> diff --git a/doc/generated/examples/troubleshoot_stacktrace_2.xml b/doc/generated/examples/troubleshoot_stacktrace_2.xml index 76cfc1a..2d88ae8 100644 --- a/doc/generated/examples/troubleshoot_stacktrace_2.xml +++ b/doc/generated/examples/troubleshoot_stacktrace_2.xml @@ -4,10 +4,10 @@ scons: *** [prog.o] Source `prog.c' not found, needed by target `prog.o'. scons: internal stack trace: File "bootstrap/src/engine/SCons/Job.py", line 199, in start task.prepare() - File "bootstrap/src/engine/SCons/Script/Main.py", line 177, in prepare + File "bootstrap/src/engine/SCons/Script/Main.py", line 190, in prepare return SCons.Taskmaster.OutOfDateTask.prepare(self) File "bootstrap/src/engine/SCons/Taskmaster.py", line 198, in prepare executor.prepare() - File "bootstrap/src/engine/SCons/Executor.py", line 430, in prepare + File "bootstrap/src/engine/SCons/Executor.py", line 431, in prepare raise SCons.Errors.StopError(msg % (s, self.batches[0].targets[0])) diff --git a/doc/generated/functions.gen b/doc/generated/functions.gen index 5e8bebb..9bed358 100644 --- a/doc/generated/functions.gen +++ b/doc/generated/functions.gen @@ -2948,30 +2948,33 @@ and added to the following construction variables: --arch CCFLAGS, LINKFLAGS --D CPPDEFINES --framework FRAMEWORKS --frameworkdir= FRAMEWORKPATH --include CCFLAGS --isysroot CCFLAGS, LINKFLAGS --isystem CCFLAGS --iquote CCFLAGS --idirafter CCFLAGS --I CPPPATH --l LIBS --L LIBPATH --mno-cygwin CCFLAGS, LINKFLAGS --mwindows LINKFLAGS --pthread CCFLAGS, LINKFLAGS --std= CFLAGS --Wa, ASFLAGS, CCFLAGS --Wl,-rpath= RPATH --Wl,-R, RPATH --Wl,-R RPATH --Wl, LINKFLAGS --Wp, CPPFLAGS -- CCFLAGS -+ CCFLAGS, LINKFLAGS +-arch CCFLAGS, LINKFLAGS +-D CPPDEFINES +-framework FRAMEWORKS +-frameworkdir= FRAMEWORKPATH +-fmerge-all-constants CCFLAGS, LINKFLAGS +-fopenmp CCFLAGS, LINKFLAGS +-include CCFLAGS +-isysroot CCFLAGS, LINKFLAGS +-isystem CCFLAGS +-iquote CCFLAGS +-idirafter CCFLAGS +-I CPPPATH +-l LIBS +-L LIBPATH +-mno-cygwin CCFLAGS, LINKFLAGS +-mwindows LINKFLAGS +-openmp CCFLAGS, LINKFLAGS +-pthread CCFLAGS, LINKFLAGS +-std= CFLAGS +-Wa, ASFLAGS, CCFLAGS +-Wl,-rpath= RPATH +-Wl,-R, RPATH +-Wl,-R RPATH +-Wl, LINKFLAGS +-Wp, CPPFLAGS +- CCFLAGS ++ CCFLAGS, LINKFLAGS diff --git a/doc/generated/tools.gen b/doc/generated/tools.gen index be717e3..ecd9c98 100644 --- a/doc/generated/tools.gen +++ b/doc/generated/tools.gen @@ -779,19 +779,19 @@ Sets construction variables for the Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-ASCOMSTR;, &cv-link-ASPPCOMSTR;. - - packaging + + Packaging -A framework for building binary and source packages. +Sets construction variables for the Package Builder. - - Packaging + + packaging -Sets construction variables for the Package Builder. +A framework for building binary and source packages. diff --git a/doc/generated/tools.mod b/doc/generated/tools.mod index f9bc1d7..1209d74 100644 --- a/doc/generated/tools.mod +++ b/doc/generated/tools.mod @@ -78,8 +78,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. mwcc"> mwld"> nasm"> -packaging"> Packaging"> +packaging"> pdf"> pdflatex"> pdftex"> @@ -186,8 +186,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. mwcc"> mwld"> nasm"> -packaging"> Packaging"> +packaging"> pdf"> pdflatex"> pdftex"> diff --git a/doc/generated/variables.gen b/doc/generated/variables.gen index 28dfc59..3f26933 100644 --- a/doc/generated/variables.gen +++ b/doc/generated/variables.gen @@ -3298,7 +3298,7 @@ The command line used to call the Java archive tool. The string displayed when the Java archive tool is called -If this is not set, then $JARCOM (the command line) is displayed. +If this is not set, then $JARCOM (the command line) is displayed. @@ -3308,7 +3308,7 @@ env = Environment(JARCOMSTR = "JARchiving $SOURCES into $TARGET") The string displayed when the Java archive tool is called -If this is not set, then $JARCOM (the command line) is displayed. +If this is not set, then $JARCOM (the command line) is displayed. @@ -6788,6 +6788,16 @@ that are needed. $SHLIBVERSION values include '1', '1.2.3', and '1.2.gitaa412c8b'. + + + + SHLIBVERSIONFLAGS + + +Extra flags added to $SHLINKCOM when building versioned +SharedLibrary. These flags are only used when $SHLIBVERSION is +set. + @@ -6801,16 +6811,6 @@ and some extra dynamically generated options (such as -Wl,-soname=$_SHLIBSONAME. It is unused by "plain" (unversioned) shared libraries. - - - - SHLIBVERSIONFLAGS - - -Extra flags added to $SHLINKCOM when building versioned -SharedLibrary. These flags are only used when $SHLIBVERSION is -set. - diff --git a/doc/generated/variables.mod b/doc/generated/variables.mod index 47576f4..372a15f 100644 --- a/doc/generated/variables.mod +++ b/doc/generated/variables.mod @@ -504,8 +504,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $_SHLIBSONAME"> $SHLIBSUFFIX"> $SHLIBVERSION"> -$_SHLIBVERSIONFLAGS"> $SHLIBVERSIONFLAGS"> +$_SHLIBVERSIONFLAGS"> $SHLINK"> $SHLINKCOM"> $SHLINKCOMSTR"> @@ -1144,8 +1144,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $_SHLIBSONAME"> $SHLIBSUFFIX"> $SHLIBVERSION"> -$_SHLIBVERSIONFLAGS"> $SHLIBVERSIONFLAGS"> +$_SHLIBVERSIONFLAGS"> $SHLINK"> $SHLINKCOM"> $SHLINKCOMSTR"> diff --git a/doc/man/scons-time.xml b/doc/man/scons-time.xml index 7251c9f..2632e41 100644 --- a/doc/man/scons-time.xml +++ b/doc/man/scons-time.xml @@ -32,8 +32,8 @@ SCONS-TIME 1 -SCons 3.1.0 -SCons 3.1.0 +SCons 3.1.1 +SCons 3.1.1 scons-time diff --git a/doc/man/scons.xml b/doc/man/scons.xml index dd9fbdd..87344cc 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -75,8 +75,8 @@ SCONS 1 -SCons 3.1.0 -SCons 3.1.0 +SCons 3.1.1 +SCons 3.1.1 scons diff --git a/doc/man/sconsign.xml b/doc/man/sconsign.xml index f70bb62..daaa260 100644 --- a/doc/man/sconsign.xml +++ b/doc/man/sconsign.xml @@ -32,8 +32,8 @@ SCONSIGN 1 -SCons 3.1.0 -SCons 3.1.0 +SCons 3.1.1 +SCons 3.1.1 sconsign diff --git a/doc/user/builders-writing.xml b/doc/user/builders-writing.xml index c36d468..2fcb11b 100644 --- a/doc/user/builders-writing.xml +++ b/doc/user/builders-writing.xml @@ -453,7 +453,7 @@ def build_function(target, source, env): A list of Node objects representing the target or targets to be - built by this builder function. + built by this function. The file names of these target(s) may be extracted using the Python &str; function. @@ -469,7 +469,7 @@ def build_function(target, source, env): A list of Node objects representing the sources to be - used by this builder function to build the targets. + used by this function to build the targets. The file names of these source(s) may be extracted using the Python &str; function. @@ -484,7 +484,7 @@ def build_function(target, source, env): The &consenv; used for building the target(s). - The builder function may use any of the + The function may use any of the environment's construction variables in any way to affect how it builds the targets. @@ -496,13 +496,14 @@ def build_function(target, source, env): - The builder function must - return a 0 or None value - if the target(s) are built successfully. - The builder function - may raise an exception - or return any non-zero value - to indicate that the build is unsuccessful. + The function will be constructed as a SCons FunctionAction and + must return a 0 or None + value if the target(s) are built successfully. The function may + raise an exception or return any non-zero value to indicate that + the build is unsuccessful. + + For more information on Actions see the Action Objects section of + the man page. -- cgit v1.2.3 From 56597a6a68e741355b301f91d5913d59cfb34eaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 28 Dec 2019 17:12:41 +0100 Subject: New upstream version 3.1.2 --- doc/generated/builders.gen | 118 ++-- doc/generated/examples/caching_ex-random_1.xml | 6 +- doc/generated/examples/troubleshoot_Dump_1.xml | 30 +- doc/generated/examples/troubleshoot_Dump_2.xml | 40 +- doc/generated/examples/troubleshoot_explain1_3.xml | 2 +- .../examples/troubleshoot_stacktrace_2.xml | 2 +- doc/generated/functions.gen | 489 +++++--------- doc/generated/functions.mod | 12 - doc/generated/tools.gen | 92 ++- doc/generated/variables.gen | 568 +++++------------ doc/generated/variables.mod | 6 +- doc/man/scons-time.xml | 57 +- doc/man/scons.xml | 699 ++++++++++++--------- doc/man/sconsign.xml | 4 +- doc/scons.mod | 4 +- doc/user/README | 2 +- doc/user/builders-writing.xml | 12 +- doc/user/command-line.xml | 63 +- doc/user/depends.xml | 179 +----- doc/user/environments.xml | 93 +-- doc/user/factories.xml | 10 +- doc/user/file-removal.xml | 2 +- doc/user/install.xml | 70 ++- doc/user/mergeflags.xml | 8 +- doc/user/output.xml | 2 +- doc/user/parseconfig.xml | 4 +- doc/user/parseflags.xml | 12 +- doc/user/separate.xml | 6 +- doc/user/sideeffect.xml | 2 +- doc/user/troubleshoot.xml | 4 +- 30 files changed, 1082 insertions(+), 1516 deletions(-) (limited to 'doc') diff --git a/doc/generated/builders.gen b/doc/generated/builders.gen index 7c62558..59d2dca 100644 --- a/doc/generated/builders.gen +++ b/doc/generated/builders.gen @@ -48,11 +48,15 @@ env.CFile(target = 'bar', source = 'bar.y') -The Command "Builder" is actually implemented -as a function that looks like a Builder, -but actually takes an additional argument of the action -from which the Builder should be made. -See the Command function description +The Command "Builder" is actually +a function that looks like a Builder, +but takes a required third argument, which is the +action to take to construct the target +from the source, used for "one-off" builds +where a full builder is not needed. +Thus it does not follow the builder +calling rules described at the start of this section. +See instead the Command function description for the calling syntax and details. @@ -465,6 +469,22 @@ a builder. env.Install('/usr/local/bin', source = ['foo', 'bar']) + + +If the command line +option is given, the target directory will be prefixed +by the directory path specified. +This is useful to test installs without installing to +a "live" location in the system. + + + +See also FindInstalledFiles. +For more thoughts on installation, see the User Guide +(particularly the section on Command-Line Targets +and the chapters on Installing Files and on Alias Targets). + + @@ -1841,72 +1861,28 @@ env.Program(target = 'foo', source = ['foo.o', 'bar.c', 'baz.f']) env.ProgramAllAtOnce() - - Builds an executable from D sources without first creating individual - objects for each file. - - - D sources can be compiled file-by-file as C and C++ source are, and - D is integrated into the scons Object and Program builders for - this model of build. D codes can though do whole source - meta-programming (some of the testing frameworks do this). For this - it is imperative that all sources are compiled and linked in a single call of - the D compiler. This builder serves that purpose. - - - env.ProgramAllAtOnce('executable', ['mod_a.d, mod_b.d', 'mod_c.d']) - - - This command will compile the modules mod_a, mod_b, and mod_c in a - single compilation process without first creating object files for - the modules. Some of the D compilers will create executable.o others - will not. - - - - Builds an executable from D sources without first creating individual - objects for each file. - - - D sources can be compiled file-by-file as C and C++ source are, and - D is integrated into the scons Object and Program builders for - this model of build. D codes can though do whole source - meta-programming (some of the testing frameworks do this). For this - it is imperative that all sources are compiled and linked in a single call of - the D compiler. This builder serves that purpose. - - - env.ProgramAllAtOnce('executable', ['mod_a.d, mod_b.d', 'mod_c.d']) - - - This command will compile the modules mod_a, mod_b, and mod_c in a - single compilation process without first creating object files for - the modules. Some of the D compilers will create executable.o others - will not. - - - - Builds an executable from D sources without first creating individual - objects for each file. - - - D sources can be compiled file-by-file as C and C++ source are, and - D is integrated into the scons Object and Program builders for - this model of build. D codes can though do whole source - meta-programming (some of the testing frameworks do this). For this - it is imperative that all sources are compiled and linked in a single call of - the D compiler. This builder serves that purpose. - - - env.ProgramAllAtOnce('executable', ['mod_a.d, mod_b.d', 'mod_c.d']) - - - This command will compile the modules mod_a, mod_b, and mod_c in a - single compilation process without first creating object files for - the modules. Some of the D compilers will create executable.o others - will not. - - + + Builds an executable from D sources without first creating individual + objects for each file. + + + D sources can be compiled file-by-file as C and C++ source are, and + D is integrated into the scons Object and Program builders for + this model of build. D codes can though do whole source + meta-programming (some of the testing frameworks do this). For this + it is imperative that all sources are compiled and linked in a single + call to the D compiler. This builder serves that purpose. + + + env.ProgramAllAtOnce('executable', ['mod_a.d, mod_b.d', 'mod_c.d']) + + + This command will compile the modules mod_a, mod_b, and mod_c in a + single compilation process without first creating object files for + the modules. Some of the D compilers will create executable.o others + will not. + + diff --git a/doc/generated/examples/caching_ex-random_1.xml b/doc/generated/examples/caching_ex-random_1.xml index d484ca4..1c99727 100644 --- a/doc/generated/examples/caching_ex-random_1.xml +++ b/doc/generated/examples/caching_ex-random_1.xml @@ -1,9 +1,9 @@ % scons -Q -cc -o f4.o -c f4.c cc -o f3.o -c f3.c -cc -o f5.o -c f5.c -cc -o f2.o -c f2.c +cc -o f4.o -c f4.c cc -o f1.o -c f1.c +cc -o f2.o -c f2.c +cc -o f5.o -c f5.c cc -o prog f1.o f2.o f3.o f4.o f5.o diff --git a/doc/generated/examples/troubleshoot_Dump_1.xml b/doc/generated/examples/troubleshoot_Dump_1.xml index 99518c0..1f6f250 100644 --- a/doc/generated/examples/troubleshoot_Dump_1.xml +++ b/doc/generated/examples/troubleshoot_Dump_1.xml @@ -1,7 +1,7 @@ % scons scons: Reading SConscript files ... -{ 'BUILDERS': {'_InternalInstall': <function InstallBuilderWrapper at 0x700000&gt;, '_InternalInstallVersionedLib': <function InstallVersionedBuilderWrapper at 0x700000&gt;, '_InternalInstallAs': <function InstallAsBuilderWrapper at 0x700000&gt;}, +{ 'BUILDERS': {'_InternalInstall': <function InstallBuilderWrapper at 0x700000>, '_InternalInstallVersionedLib': <function InstallVersionedBuilderWrapper at 0x700000>, '_InternalInstallAs': <function InstallAsBuilderWrapper at 0x700000>}, 'CONFIGUREDIR': '#/.sconf_temp', 'CONFIGURELOG': '#/config.log', 'CPPSUFFIXES': [ '.c', @@ -25,16 +25,16 @@ scons: Reading SConscript files ... '.SPP', '.sx'], 'DSUFFIXES': ['.d'], - 'Dir': <SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;, - 'Dirs': <SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;, + 'Dir': <SCons.Defaults.Variable_Method_Caller object at 0x700000>, + 'Dirs': <SCons.Defaults.Variable_Method_Caller object at 0x700000>, 'ENV': { 'PATH': '/usr/local/bin:/opt/bin:/bin:/usr/bin'}, - 'ESCAPE': <function escape at 0x700000&gt;, - 'File': <SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;, + 'ESCAPE': <function escape at 0x700000>, + 'File': <SCons.Defaults.Variable_Method_Caller object at 0x700000>, 'HOST_ARCH': None, 'HOST_OS': None, 'IDLSUFFIXES': ['.idl', '.IDL'], - 'INSTALL': <function copyFunc at 0x700000&gt;, - 'INSTALLVERSIONEDLIB': <function copyFuncVersionedLib at 0x700000&gt;, + 'INSTALL': <function copyFunc at 0x700000>, + 'INSTALLVERSIONEDLIB': <function copyFuncVersionedLib at 0x700000>, 'LIBPREFIX': 'lib', 'LIBPREFIXES': ['$LIBPREFIX'], 'LIBSUFFIX': '.a', @@ -45,15 +45,15 @@ scons: Reading SConscript files ... 'PLATFORM': 'posix', 'PROGPREFIX': '', 'PROGSUFFIX': '', - 'PSPAWN': <function piped_env_spawn at 0x700000&gt;, - 'RDirs': <SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;, - 'SCANNERS': [<SCons.Scanner.Base object at 0x700000&gt;], + 'PSPAWN': <function piped_env_spawn at 0x700000>, + 'RDirs': <SCons.Defaults.Variable_Method_Caller object at 0x700000>, + 'SCANNERS': [<SCons.Scanner.Base object at 0x700000>], 'SHELL': 'sh', 'SHLIBPREFIX': '$LIBPREFIX', 'SHLIBSUFFIX': '.so', 'SHOBJPREFIX': '$OBJPREFIX', 'SHOBJSUFFIX': '$OBJSUFFIX', - 'SPAWN': <function subprocess_spawn at 0x700000&gt;, + 'SPAWN': <function subprocess_spawn at 0x700000>, 'TARGET_ARCH': None, 'TARGET_OS': None, 'TEMPFILE': <class 'SCons.Platform.TempFileMunge'>, @@ -69,10 +69,10 @@ scons: Reading SConscript files ... '__LDMODULEVERSIONFLAGS': '${__libversionflags(__env__,"LDMODULEVERSION","_LDMODULEVERSIONFLAGS")}', '__RPATH': '$_RPATH', '__SHLIBVERSIONFLAGS': '${__libversionflags(__env__,"SHLIBVERSION","_SHLIBVERSIONFLAGS")}', - '__libversionflags': <function __libversionflags at 0x700000&gt;, - '_concat': <function _concat at 0x700000&gt;, - '_defines': <function _defines at 0x700000&gt;, - '_stripixes': <function _stripixes at 0x700000&gt;} + '__libversionflags': <function __libversionflags at 0x700000>, + '_concat': <function _concat at 0x700000>, + '_defines': <function _defines at 0x700000>, + '_stripixes': <function _stripixes at 0x700000>} scons: done reading SConscript files. scons: Building targets ... scons: `.' is up to date. diff --git a/doc/generated/examples/troubleshoot_Dump_2.xml b/doc/generated/examples/troubleshoot_Dump_2.xml index d83fb94..4b8aa0b 100644 --- a/doc/generated/examples/troubleshoot_Dump_2.xml +++ b/doc/generated/examples/troubleshoot_Dump_2.xml @@ -1,9 +1,9 @@ C:\>scons scons: Reading SConscript files ... -{ 'BUILDERS': {'_InternalInstallVersionedLib': <function InstallVersionedBuilderWrapper at 0x700000&gt;, '_InternalInstall': <function InstallBuilderWrapper at 0x700000&gt;, 'Object': <SCons.Builder.CompositeBuilder object at 0x700000&gt;, 'PCH': <SCons.Builder.BuilderBase object at 0x700000&gt;, 'RES': <SCons.Builder.BuilderBase object at 0x700000&gt;, 'SharedObject': <SCons.Builder.CompositeBuilder object at 0x700000&gt;, 'StaticObject': <SCons.Builder.CompositeBuilder object at 0x700000&gt;, '_InternalInstallAs': <function InstallAsBuilderWrapper at 0x700000&gt;}, +{ 'BUILDERS': {'_InternalInstallVersionedLib': <function InstallVersionedBuilderWrapper at 0x700000>, '_InternalInstall': <function InstallBuilderWrapper at 0x700000>, 'Object': <SCons.Builder.CompositeBuilder object at 0x700000>, 'PCH': <SCons.Builder.BuilderBase object at 0x700000>, 'RES': <SCons.Builder.BuilderBase object at 0x700000>, 'SharedObject': <SCons.Builder.CompositeBuilder object at 0x700000>, 'StaticObject': <SCons.Builder.CompositeBuilder object at 0x700000>, '_InternalInstallAs': <function InstallAsBuilderWrapper at 0x700000>}, 'CC': 'cl', - 'CCCOM': <SCons.Action.FunctionAction object at 0x700000&gt;, + 'CCCOM': <SCons.Action.FunctionAction object at 0x700000>, 'CCFLAGS': ['/nologo'], 'CCPCHFLAGS': ['${(PCH and "/Yu%s \\"/Fp%s\\""%(PCHSTOP or "",File(PCH))) or ""}'], 'CCPDBFLAGS': ['${(PDB and "/Z7") or ""}'], @@ -38,20 +38,20 @@ scons: Reading SConscript files ... 'CXXFILESUFFIX': '.cc', 'CXXFLAGS': ['$(', '/TP', '$)'], 'DSUFFIXES': ['.d'], - 'Dir': <SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;, - 'Dirs': <SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;, + 'Dir': <SCons.Defaults.Variable_Method_Caller object at 0x700000>, + 'Dirs': <SCons.Defaults.Variable_Method_Caller object at 0x700000>, 'ENV': { 'PATH': 'C:\\WINDOWS\\System32', 'PATHEXT': '.COM;.EXE;.BAT;.CMD', 'SystemRoot': 'C:\\WINDOWS'}, - 'ESCAPE': <function escape at 0x700000&gt;, - 'File': <SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;, + 'ESCAPE': <function escape at 0x700000>, + 'File': <SCons.Defaults.Variable_Method_Caller object at 0x700000>, 'HOST_ARCH': '', 'HOST_OS': 'win32', 'IDLSUFFIXES': ['.idl', '.IDL'], 'INCPREFIX': '/I', 'INCSUFFIX': '', - 'INSTALL': <function copyFunc at 0x700000&gt;, - 'INSTALLVERSIONEDLIB': <function copyFuncVersionedLib at 0x700000&gt;, + 'INSTALL': <function copyFunc at 0x700000>, + 'INSTALLVERSIONEDLIB': <function copyFuncVersionedLib at 0x700000>, 'LEXUNISTD': ['--nounistd'], 'LIBPREFIX': '', 'LIBPREFIXES': ['$LIBPREFIX'], @@ -66,26 +66,26 @@ scons: Reading SConscript files ... 'PLATFORM': 'win32', 'PROGPREFIX': '', 'PROGSUFFIX': '.exe', - 'PSPAWN': <function piped_spawn at 0x700000&gt;, + 'PSPAWN': <function piped_spawn at 0x700000>, 'RC': 'rc', - 'RCCOM': <SCons.Action.FunctionAction object at 0x700000&gt;, + 'RCCOM': <SCons.Action.FunctionAction object at 0x700000>, 'RCFLAGS': ['/nologo'], 'RCSUFFIXES': ['.rc', '.rc2'], - 'RDirs': <SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;, - 'SCANNERS': [<SCons.Scanner.Base object at 0x700000&gt;], + 'RDirs': <SCons.Defaults.Variable_Method_Caller object at 0x700000>, + 'SCANNERS': [<SCons.Scanner.Base object at 0x700000>], 'SHCC': '$CC', - 'SHCCCOM': <SCons.Action.FunctionAction object at 0x700000&gt;, + 'SHCCCOM': <SCons.Action.FunctionAction object at 0x700000>, 'SHCCFLAGS': ['$CCFLAGS'], 'SHCFLAGS': ['$CFLAGS'], 'SHCXX': '$CXX', 'SHCXXCOM': '${TEMPFILE("$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM","$SHCXXCOMSTR")}', 'SHCXXFLAGS': ['$CXXFLAGS'], - 'SHELL': 'command', + 'SHELL': None, 'SHLIBPREFIX': '', 'SHLIBSUFFIX': '.dll', 'SHOBJPREFIX': '$OBJPREFIX', 'SHOBJSUFFIX': '$OBJSUFFIX', - 'SPAWN': <function spawn at 0x700000&gt;, + 'SPAWN': <function spawn at 0x700000>, 'STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME': 1, 'TARGET_ARCH': None, 'TARGET_OS': None, @@ -98,14 +98,14 @@ scons: Reading SConscript files ... '_CPPINCFLAGS': '$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)', '_LIBDIRFLAGS': '$( ${_concat(LIBDIRPREFIX, LIBPATH, LIBDIRSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)', '_LIBFLAGS': '${_concat(LIBLINKPREFIX, LIBS, LIBLINKSUFFIX, __env__)}', - '_MSVC_OUTPUT_FLAG': <function msvc_output_flag at 0x700000&gt;, + '_MSVC_OUTPUT_FLAG': <function msvc_output_flag at 0x700000>, '__DSHLIBVERSIONFLAGS': '${__libversionflags(__env__,"DSHLIBVERSION","_DSHLIBVERSIONFLAGS")}', '__LDMODULEVERSIONFLAGS': '${__libversionflags(__env__,"LDMODULEVERSION","_LDMODULEVERSIONFLAGS")}', '__SHLIBVERSIONFLAGS': '${__libversionflags(__env__,"SHLIBVERSION","_SHLIBVERSIONFLAGS")}', - '__libversionflags': <function __libversionflags at 0x700000&gt;, - '_concat': <function _concat at 0x700000&gt;, - '_defines': <function _defines at 0x700000&gt;, - '_stripixes': <function _stripixes at 0x700000&gt;} + '__libversionflags': <function __libversionflags at 0x700000>, + '_concat': <function _concat at 0x700000>, + '_defines': <function _defines at 0x700000>, + '_stripixes': <function _stripixes at 0x700000>} scons: done reading SConscript files. scons: Building targets ... scons: `.' is up to date. diff --git a/doc/generated/examples/troubleshoot_explain1_3.xml b/doc/generated/examples/troubleshoot_explain1_3.xml index ed8f6d9..ebc13f8 100644 --- a/doc/generated/examples/troubleshoot_explain1_3.xml +++ b/doc/generated/examples/troubleshoot_explain1_3.xml @@ -3,5 +3,5 @@ cp file.in file.oout scons: warning: Cannot find target file.out after building -File "/Users/bdbaddog/devel/scons/git/as_scons/src/script/scons.py", line 204, in <module> +File "/home/bdeegan/devel/scons/git/as_scons/src/script/scons.py", line 204, in <module> diff --git a/doc/generated/examples/troubleshoot_stacktrace_2.xml b/doc/generated/examples/troubleshoot_stacktrace_2.xml index 2d88ae8..70a429d 100644 --- a/doc/generated/examples/troubleshoot_stacktrace_2.xml +++ b/doc/generated/examples/troubleshoot_stacktrace_2.xml @@ -4,7 +4,7 @@ scons: *** [prog.o] Source `prog.c' not found, needed by target `prog.o'. scons: internal stack trace: File "bootstrap/src/engine/SCons/Job.py", line 199, in start task.prepare() - File "bootstrap/src/engine/SCons/Script/Main.py", line 190, in prepare + File "bootstrap/src/engine/SCons/Script/Main.py", line 191, in prepare return SCons.Taskmaster.OutOfDateTask.prepare(self) File "bootstrap/src/engine/SCons/Taskmaster.py", line 198, in prepare executor.prepare() diff --git a/doc/generated/functions.gen b/doc/generated/functions.gen index 9bed358..d71387e 100644 --- a/doc/generated/functions.gen +++ b/doc/generated/functions.gen @@ -25,8 +25,8 @@ Creates an Action object for the specified action. -See the section "Action Objects," -below, for a complete explanation of the arguments and behavior. +See the manpage section "Action Objects" +for a complete explanation of the arguments and behavior. @@ -121,11 +121,11 @@ env.other_method_name('another arg') This function adds a new command-line option to be recognized. The specified arguments -are the same as supported by the standard Python -optparse.add_option() -method (with a few additional capabilities noted below); +are the same as supported by the add_option +method in the standard Python library module optparse, +with a few additional capabilities noted below; see the documentation for -optparse +optparse for a thorough discussion of its option-processing capabities. @@ -165,6 +165,15 @@ the option will have a default value of None. + +Unlike regular optparse, option names +added via AddOption must be matched +exactly, the automatic matching of abbreviations on the +command line for long options is not supported. +To allow specific abbreviations, +include them in the AddOption call. + + Once a new command-line option has been added with AddOption, @@ -172,17 +181,21 @@ the option value may be accessed using GetOption or env.GetOption(). + +SetOption is not currently supported for +options added with AddOption. @@ -221,6 +234,22 @@ AddOption('--prefix', help='installation prefix') env = Environment(PREFIX = GetOption('prefix')) + + + +While AddOption behaves like +add_option, +from the optparse module, +the behavior of options added by AddOption +which take arguments is underfined in +scons if whitespace +(rather than an = sign) is used as +the separator on the command line when +the option is invoked. +Such usage should be avoided. + + + @@ -241,7 +270,8 @@ has been built. The specified action(s) may be an Action object, or anything that can be converted into an Action object -(see below). +See the manpage section "Action Objects" +for a complete explanation. @@ -270,7 +300,8 @@ is built. The specified action(s) may be an Action object, or anything that can be converted into an Action object -(see below). +See the manpage section "Action Objects" +for a complete explanation. @@ -444,7 +475,7 @@ Otherwise, the construction variable and the value of the keyword argument are both coerced to lists, and the lists are added together. -(See also the Prepend method, below.) +(See also the Prepend method). @@ -530,30 +561,6 @@ Example: env.AppendUnique(CCFLAGS = '-g', FOO = ['foo.yyy']) - - - - - BuildDir(build_dir, src_dir, [duplicate]) - - - env.BuildDir(build_dir, src_dir, [duplicate]) - - - -Deprecated synonyms for -VariantDir -and -env.VariantDir(). -The -build_dir -argument becomes the -variant_dir -argument of -VariantDir -or -env.VariantDir(). - @@ -568,8 +575,8 @@ or Creates a Builder object for the specified action. -See the section "Builder Objects," -below, for a complete explanation of the arguments and behavior. +See the manpage section "Builder Objects" +for a complete explanation of the arguments and behavior. @@ -849,19 +856,29 @@ for a single special-case build. -As a special case, the -source_scanner -keyword argument can +Command builder accepts +source_scanner, +target_scanner, +source_factory, and +target_factory +keyword arguments. The *_scanner args can be used to specify a Scanner object -that will be used to scan the sources. -(The global +that will be used to apply a custom +scanner for a source or target. +For example, the global DirScanner object can be used if any of the sources will be directories that must be scanned on-disk for changes to files that aren't -already specified in other Builder of function calls.) +already specified in other Builder of function calls. +The *_factory args take a factory function that the +Command will use to turn any sources or targets +specified as strings into SCons Nodes. +See the sections "Builder Objects" +below, for more information about how these +args work in a Builder. @@ -873,7 +890,7 @@ same-named existing construction variables. An action can be an external command, specified as a string, or a callable Python object; -see "Action Objects," below, +see the manpage section "Action Objects" for more complete information. Also note that a string specifying an external command may be preceded by an @@ -897,7 +914,7 @@ env.Command('foo.out', 'foo.in', env.Command('bar.out', 'bar.in', ["rm -f $TARGET", "$BAR_BUILD < $SOURCES > $TARGET"], - ENV = {'PATH' : '/usr/local/bin/'}) + ENV={'PATH': '/usr/local/bin/'}) def rename(env, target, source): import os @@ -905,7 +922,7 @@ def rename(env, target, source): env.Command('baz.out', 'baz.in', ["$BAZ_BUILD < $SOURCES > .tmp", - rename ]) + rename]) @@ -914,14 +931,14 @@ Note that the function will usually assume, by default, that the specified targets and/or sources are Files, if no other part of the configuration -identifies what type of entry it is. +identifies what type of entries they are. If necessary, you can explicitly specify that targets or source nodes should -be treated as directoriese +be treated as directories by using the Dir or -env.Dir() +env.Dir functions. @@ -937,9 +954,9 @@ env.Command(env.Dir('$DISTDIR')), None, make_distdir) -(Also note that SCons will usually +Also note that SCons will usually automatically create any directory necessary to hold a target file, -so you normally don't need to create directories by hand.) +so you normally don't need to create directories by hand. @@ -954,8 +971,8 @@ so you normally don't need to create directories by hand.) Creates a Configure object for integrated functionality similar to GNU autoconf. -See the section "Configure Contexts," -below, for a complete explanation of the arguments and behavior. +See the manpage section "Configure Contexts" +for a complete explanation of the arguments and behavior. @@ -1262,15 +1279,21 @@ see below. - DefaultEnvironment([args]) + DefaultEnvironment([**kwargs]) -Creates and returns a default construction environment object. -This construction environment is used internally by SCons -in order to execute many of the global functions in this list, -and to fetch source files transparently +Creates and returns the default construction environment object. +The default construction environment is used internally by SCons +in order to execute many of the global functions in this list +(i.e. those not called as methods of a specific +construction environment), and to fetch source files transparently from source code management systems. +The default environment is a singleton, so the keyword +arguments affect it only on the first call, on subsequent +calls the already-constructed object is returned. +The default environment can be modified in the same way +as any construction environment. @@ -1333,11 +1356,11 @@ env.Depends(bar, installed_lib) Returns a dictionary object -containing copies of all of the -construction variables in the environment. -If there are any variable names specified, -only the specified construction -variables are returned in the dictionary. +containing the construction variables in the construction environment. +If there are any arguments specified, +the values of the specified construction variables +are returned as a string (if one +argument) or as a list of strings. @@ -1345,8 +1368,8 @@ Example: -dict = env.Dictionary() -cc_dict = env.Dictionary('CC', 'CCFLAGS', 'CCCOM') +cvars = env.Dictionary() +cc_values = env.Dictionary('CC', 'CCFLAGS', 'CCCOM') @@ -1385,7 +1408,8 @@ would supply a string as a directory name to a Builder method or function. Directory Nodes have attributes and methods that are useful in many situations; -see "File and Directory Nodes," below. +see manpage section "File and Directory Nodes" +for more information. @@ -1408,7 +1432,7 @@ This SConstruct: env=Environment() -print env.Dump('CCCOM') +print(env.Dump('CCCOM')) @@ -1425,7 +1449,7 @@ While this SConstruct: env=Environment() -print env.Dump() +print(env.Dump()) @@ -1528,8 +1552,8 @@ Executes an Action object. The specified action may be an Action object -(see the section "Action Objects," -below, for a complete explanation of the arguments and behavior), +(see manpage section "Action Objects" +for a complete explanation of the arguments and behavior), or it may be a command-line string, list of commands, or executable Python function, @@ -1686,7 +1710,8 @@ would supply a string as a file name to a Builder method or function. File Nodes have attributes and methods that are useful in many situations; -see "File and Directory Nodes," below. +see manpage section "File and Directory Nodes" +for more information. @@ -2836,7 +2861,7 @@ and the construction variables they affect are as specified for the env.ParseFlags method (which this method calls). -See that method's description, below, +See that method's description for a table of options and construction variables. @@ -2955,6 +2980,7 @@ and added to the following construction variables: -fmerge-all-constants CCFLAGS, LINKFLAGS -fopenmp CCFLAGS, LINKFLAGS -include CCFLAGS +-imacros CCFLAGS -isysroot CCFLAGS, LINKFLAGS -isystem CCFLAGS -iquote CCFLAGS @@ -3539,8 +3565,8 @@ Return('val1 val2') Creates a Scanner object for the specified function. -See the section "Scanner Objects," -below, for a complete explanation of the arguments and behavior. +See manpage section "Scanner Objects" +for a complete explanation of the arguments and behavior. @@ -4227,107 +4253,6 @@ env.SourceCode('no_source.c', None) - - - - - SourceSignatures(type) - - - env.SourceSignatures(type) - - - -Note: Although it is not yet officially deprecated, -use of this function is discouraged. -See the -Decider -function for a more flexible and straightforward way -to configure SCons' decision-making. - - - -The -SourceSignatures -function tells -scons -how to decide if a source file -(a file that is not built from any other files) -has changed since the last time it -was used to build a particular target file. -Legal values are -MD5 -or -timestamp. - - - -If the environment method is used, -the specified type of source signature -is only used when deciding whether targets -built with that environment are up-to-date or must be rebuilt. -If the global function is used, -the specified type of source signature becomes the default -used for all decisions -about whether targets are up-to-date. - - - -MD5 -means -scons -decides that a source file has changed -if the MD5 checksum of its contents has changed since -the last time it was used to rebuild a particular target file. - - - -timestamp -means -scons -decides that a source file has changed -if its timestamp (modification time) has changed since -the last time it was used to rebuild a particular target file. -(Note that although this is similar to the behavior of Make, -by default it will also rebuild if the dependency is -older -than the last time it was used to rebuild the target file.) - - - -There is no different between the two behaviors -for Python -Value -node objects. - - - -MD5 -signatures take longer to compute, -but are more accurate than -timestamp -signatures. -The default value is -MD5. - - - -Note that the default -TargetSignatures -setting (see below) -is to use this -SourceSignatures -setting for any target files that are used -to build other target files. -Consequently, changing the value of -SourceSignatures -will, by default, -affect the up-to-date decision for all files in the build -(or all files built with a specific construction environment -when -env.SourceSignatures -is used). - @@ -4462,7 +4387,7 @@ Example: -print env.subst("The C compiler is: $CC") +print(env.subst("The C compiler is: $CC")) def compile(target, source, env): sourceDir = env.subst("${SOURCE.srcdir}", @@ -4492,168 +4417,13 @@ Examples: -# makes sure the built library will be installed with 0644 file +# makes sure the built library will be installed with 0o644 file # access mode -Tag( Library( 'lib.c' ), UNIX_ATTR="0644" ) +Tag( Library( 'lib.c' ), UNIX_ATTR="0o644" ) # marks file2.txt to be a documentation file Tag( 'file2.txt', DOC ) - - - - - TargetSignatures(type) - - - env.TargetSignatures(type) - - - -Note: Although it is not yet officially deprecated, -use of this function is discouraged. -See the -Decider -function for a more flexible and straightforward way -to configure SCons' decision-making. - - - -The -TargetSignatures -function tells -scons -how to decide if a target file -(a file that -is -built from any other files) -has changed since the last time it -was used to build some other target file. -Legal values are -"build"; -"content" -(or its synonym -"MD5"); -"timestamp"; -or -"source". - - - -If the environment method is used, -the specified type of target signature is only used -for targets built with that environment. -If the global function is used, -the specified type of signature becomes the default -used for all target files that -don't have an explicit target signature type -specified for their environments. - - - -"content" -(or its synonym -"MD5") -means -scons -decides that a target file has changed -if the MD5 checksum of its contents has changed since -the last time it was used to rebuild some other target file. -This means -scons -will open up -MD5 sum the contents -of target files after they're built, -and may decide that it does not need to rebuild -"downstream" target files if a file was -rebuilt with exactly the same contents as the last time. - - - -"timestamp" -means -scons -decides that a target file has changed -if its timestamp (modification time) has changed since -the last time it was used to rebuild some other target file. -(Note that although this is similar to the behavior of Make, -by default it will also rebuild if the dependency is -older -than the last time it was used to rebuild the target file.) - - - -"source" -means -scons -decides that a target file has changed -as specified by the corresponding -SourceSignatures -setting -("MD5" -or -"timestamp"). -This means that -scons -will treat all input files to a target the same way, -regardless of whether they are source files -or have been built from other files. - - - -"build" -means -scons -decides that a target file has changed -if it has been rebuilt in this invocation -or if its content or timestamp have changed -as specified by the corresponding -SourceSignatures -setting. -This "propagates" the status of a rebuilt file -so that other "downstream" target files -will always be rebuilt, -even if the contents or the timestamp -have not changed. - - - -"build" -signatures are fastest because -"content" -(or -"MD5") -signatures take longer to compute, -but are more accurate than -"timestamp" -signatures, -and can prevent unnecessary "downstream" rebuilds -when a target file is rebuilt to the exact same contents -as the previous build. -The -"source" -setting provides the most consistent behavior -when other target files may be rebuilt from -both source and target input files. -The default value is -"source". - - - -Because the default setting is -"source", -using -SourceSignatures -is generally preferable to -TargetSignatures, -so that the up-to-date decision -will be consistent for all files -(or all files built with a specific construction environment). -Use of -TargetSignatures -provides specific control for how built target files -affect their "downstream" dependencies. - @@ -4949,30 +4719,51 @@ SConscript(dirs='doc', variant_dir='build/doc', duplicate=0) Searches for the specified executable program, returning the full path name to the program -if it is found, -and returning None if not. -Searches the specified -path, -the value of the calling environment's PATH -(env['ENV']['PATH']), -or the user's current external PATH -(os.environ['PATH']) -by default. +if it is found, else None. +Searches the value of the +path keyword argument, +or if None (the default) +the value of the calling environment's PATH +(env['ENV']['PATH']). +If path is None and +the env['ENV']['PATH'] key does not exist, +the user's current external PATH +(os.environ['PATH']) is used as fallback. + + On Windows systems, searches for executable -programs with any of the file extensions -listed in the specified -pathext, -the calling environment's PATHEXT -(env['ENV']['PATHEXT']) -or the user's current PATHEXT +programs with any of the file extensions listed in the +pathext keyword argument, +or if None (the default) +the calling environment's PATHEXT +(env['ENV']['PATHEXT']). +The user's current external PATHEXT (os.environ['PATHEXT']) -by default. +is used as a fallback if pathext is +None +and the key env['ENV']['PATHEXT'] +does not exist. + + Will not select any path name or names in the specified reject list, if any. + + +If you would prefer to search +the user's current external PATH +(os.environ['PATH']) +by default, +consider using the function SCons.Util.WhereIs instead. +Note that SCons.Util.WhereIs +does not expand environment variables automatically +(no implicit env.subst for its arguments). + + + diff --git a/doc/generated/functions.mod b/doc/generated/functions.mod index e460aaf..3d49229 100644 --- a/doc/generated/functions.mod +++ b/doc/generated/functions.mod @@ -19,7 +19,6 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. Append"> AppendENVPath"> AppendUnique"> -BuildDir"> Builder"> CacheDir"> Clean"> @@ -82,11 +81,9 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. SetOption"> SideEffect"> SourceCode"> -SourceSignatures"> Split"> subst"> Tag"> -TargetSignatures"> Tool"> Value"> VariantDir"> @@ -103,7 +100,6 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.Append"> env.AppendENVPath"> env.AppendUnique"> -env.BuildDir"> env.Builder"> env.CacheDir"> env.Clean"> @@ -166,11 +162,9 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.SetOption"> env.SideEffect"> env.SourceCode"> -env.SourceSignatures"> env.Split"> env.subst"> env.Tag"> -env.TargetSignatures"> env.Tool"> env.Value"> env.VariantDir"> @@ -197,7 +191,6 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. Append"> AppendENVPath"> AppendUnique"> -BuildDir"> Builder"> CacheDir"> Clean"> @@ -260,11 +253,9 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. SetOption"> SideEffect"> SourceCode"> -SourceSignatures"> Split"> subst"> Tag"> -TargetSignatures"> Tool"> Value"> VariantDir"> @@ -281,7 +272,6 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.Append"> env.AppendENVPath"> env.AppendUnique"> -env.BuildDir"> env.Builder"> env.CacheDir"> env.Clean"> @@ -344,11 +334,9 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.SetOption"> env.SideEffect"> env.SourceCode"> -env.SourceSignatures"> env.Split"> env.subst"> env.Tag"> -env.TargetSignatures"> env.Tool"> env.Value"> env.VariantDir"> diff --git a/doc/generated/tools.gen b/doc/generated/tools.gen index ecd9c98..0d30f6f 100644 --- a/doc/generated/tools.gen +++ b/doc/generated/tools.gen @@ -91,7 +91,7 @@ Sets construction variables for the bcc32 compiler. cc -Sets construction variables for generic POSIX C copmilers. +Sets construction variables for generic POSIX C compilers. Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CCFLAGS;, &cv-link-CFILESUFFIX;, &cv-link-CFLAGS;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-FRAMEWORKPATH;, &cv-link-FRAMEWORKS;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-PLATFORM;. @@ -139,9 +139,91 @@ Set construction variables for cygwin linker/loader. default -Sets variables by calling a default list of Tool modules -for the platform on which SCons is running. +Sets construction variables for a default list of Tool modules. +Use default +in the tools list to retain the original defaults, +since the tools parameter +is treated as a literal statement of the tools +to be made available in that construction environment, not an addition. + + +The list of tools selected by default is not static, +but is dependent both on +the platform and on the software installed on the platform. +Some tools will not initialize if an underlying command is +not found, and some tools are selected from a list of choices +on a first-found basis. The finished tool list can be +examined by inspecting the TOOLS construction variable +in the construction environment. + + + +On all platforms, all tools from the following list +are selected whose respective conditions are met: +filesystem, wix, lex, yacc, rpcgen, swig, +jar, javac, javah, rmic, dvipdf, dvips, gs, +tex, latex, pdflatex, pdftex, tar, zip, textfile. + + + +On Linux systems, the default tools list selects +(first-found): a C compiler from +gcc, intelc, icc, cc; +a C++ compiler from +g++, intelc, icc, cxx; +an assembler from +gas, nasm, masm; +a linker from +gnulink, ilink; +a Fortran compiler from +gfortran, g77, ifort, ifl, f95, f90, f77; +and a static archiver 'ar'. +It also selects all found from the list +m4, rpm. + + + +On Windows systems, the default tools list selects +(first-found): a C compiler from +msvc, mingw, gcc, intelc, icl, icc, cc, bcc32; +a C++ compiler from +msvc, intelc, icc, g++, cxx, bcc32; +an assembler from +masm, nasm, gas, 386asm; +a linker from +mslink, gnulink, ilink, linkloc, ilink32; +a Fortran compiler from +gfortran, g77, ifl, cvf, f95, f90, fortran; +and a static archiver from +mslib, ar, tlib; +It also selects all found from the list +msvs, midl. + + + +On MacOS systems, the default tools list selects +(first-found): a C compiler from +gcc, cc; +a C++ compiler from +g++, cxx; +an assembler 'as'; +a linker from +applelink, gnulink; +a Fortran compiler from +gfortran, f95, f90, g77; +and a static archiver ar. +It also selects all found from the list +m4, rpm. + + + +Default lists for other platforms can be found by +examining the scons +source code (see +SCons/Tool/__init__.py). + + @@ -627,7 +709,9 @@ Sets construction variables for the -Sets construction variables for generic POSIX linkers. +Sets construction variables for generic POSIX linkers. This is +a "smart" linker tool which selects a compiler to complete the linking +based on the types of source files. Sets: &cv-link-LDMODULE;, &cv-link-LDMODULECOM;, &cv-link-LDMODULEFLAGS;, &cv-link-LDMODULENOVERSIONSYMLINKS;, &cv-link-LDMODULEPREFIX;, &cv-link-LDMODULESUFFIX;, &cv-link-LDMODULEVERSION;, &cv-link-LDMODULEVERSIONFLAGS;, &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-__LDMODULEVERSIONFLAGS;, &cv-link-__SHLIBVERSIONFLAGS;.Uses: &cv-link-LDMODULECOMSTR;, &cv-link-LINKCOMSTR;, &cv-link-SHLINKCOMSTR;. diff --git a/doc/generated/variables.gen b/doc/generated/variables.gen index 3f26933..9050832 100644 --- a/doc/generated/variables.gen +++ b/doc/generated/variables.gen @@ -488,7 +488,8 @@ after the SCons template for the file has been written. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -498,7 +499,8 @@ that may not be set or used in a construction environment. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -874,35 +876,15 @@ depending on the specific C++ compiler being used. The D compiler to use. - - -The D compiler to use. - - - -The D compiler to use. - DCOM - The command line used to compile a D file to an object file. - Any options specified in the $DFLAGS construction variable - is included on this command line. - - - - The command line used to compile a D file to an object file. - Any options specified in the $DFLAGS construction variable - is included on this command line. - - - - The command line used to compile a D file to an object file. - Any options specified in the $DFLAGS construction variable - is included on this command line. +The command line used to compile a D file to an object file. +Any options specified in the $DFLAGS construction variable +is included on this command line. @@ -910,49 +892,25 @@ The D compiler to use. DDEBUG - List of debug tags to enable when compiling. - - - - List of debug tags to enable when compiling. - - - - List of debug tags to enable when compiling. +List of debug tags to enable when compiling. DDEBUGPREFIX - - DDEBUGPREFIX. - - - - DDEBUGPREFIX. - - - - DDEBUGPREFIX. - - + +DDEBUGPREFIX. + + DDEBUGSUFFIX - - DDEBUGSUFFIX. - - - - DDEBUGSUFFIX. - - - - DDEBUGSUFFIX. - - + +DDEBUGSUFFIX. + + DESCRIPTION @@ -980,98 +938,50 @@ section of an RPM DFILESUFFIX - - DFILESUFFIX. - - - - DFILESUFFIX. - - - - DFILESUFFIX. - - + +DFILESUFFIX. + + DFLAGPREFIX - - DFLAGPREFIX. - - - - DFLAGPREFIX. - - - - DFLAGPREFIX. - - + +DFLAGPREFIX. + + DFLAGS - General options that are passed to the D compiler. - - - - General options that are passed to the D compiler. - - - - General options that are passed to the D compiler. +General options that are passed to the D compiler. DFLAGSUFFIX - - DFLAGSUFFIX. - - - - DFLAGSUFFIX. - - - - DFLAGSUFFIX. - - + +DFLAGSUFFIX. + + DINCPREFIX - - DINCPREFIX. - - - - DINCPREFIX. - - - - DINCPREFIX. - - + +DINCPREFIX. + + DINCSUFFIX - - DLIBFLAGSUFFIX. - - - - DLIBFLAGSUFFIX. - - - - DLIBFLAGSUFFIX. - - + +DLIBFLAGSUFFIX. + + Dir @@ -1100,15 +1010,7 @@ into a list of Dir instances relative to the target being built. DLIB - Name of the lib tool to use for D codes. - - - - Name of the lib tool to use for D codes. - - - - Name of the lib tool to use for D codes. +Name of the lib tool to use for D codes. @@ -1116,127 +1018,63 @@ into a list of Dir instances relative to the target being built. DLIBCOM - The command line to use when creating libraries. - - - - The command line to use when creating libraries. - - - - The command line to use when creating libraries. +The command line to use when creating libraries. DLIBDIRPREFIX - - DLIBLINKPREFIX. - - - - DLIBLINKPREFIX. - - - - DLIBLINKPREFIX. - - + +DLIBLINKPREFIX. + + DLIBDIRSUFFIX - - DLIBLINKSUFFIX. - - - - DLIBLINKSUFFIX. - - - - DLIBLINKSUFFIX. - - + +DLIBLINKSUFFIX. + + DLIBFLAGPREFIX - - DLIBFLAGPREFIX. - - - - DLIBFLAGPREFIX. - - - - DLIBFLAGPREFIX. - - + +DLIBFLAGPREFIX. + + DLIBFLAGSUFFIX - - DLIBFLAGSUFFIX. - - - - DLIBFLAGSUFFIX. - - - - DLIBFLAGSUFFIX. - - + +DLIBFLAGSUFFIX. + + DLIBLINKPREFIX - - DLIBLINKPREFIX. - - - - DLIBLINKPREFIX. - - - - DLIBLINKPREFIX. - - + +DLIBLINKPREFIX. + + DLIBLINKSUFFIX - - DLIBLINKSUFFIX. - - - - DLIBLINKSUFFIX. - - - - DLIBLINKSUFFIX. - - + +DLIBLINKSUFFIX. + + DLINK - Name of the linker to use for linking systems including D sources. - - - - Name of the linker to use for linking systems including D sources. - - - - Name of the linker to use for linking systems including D sources. +Name of the linker to use for linking systems including D sources. @@ -1244,33 +1082,17 @@ into a list of Dir instances relative to the target being built. DLINKCOM - The command line to use when linking systems including D sources. - - - - The command line to use when linking systems including D sources. - - - - The command line to use when linking systems including D sources. +The command line to use when linking systems including D sources. DLINKFLAGPREFIX - - DLINKFLAGPREFIX. - - - - DLINKFLAGPREFIX. - - - - DLINKFLAGPREFIX. - - + +DLINKFLAGPREFIX. + + DLINKFLAGS @@ -1278,31 +1100,15 @@ into a list of Dir instances relative to the target being built. List of linker flags. - - -List of linker flags. - - - -List of linker flags. - DLINKFLAGSUFFIX - - DLINKFLAGSUFFIX. - - - - DLINKFLAGSUFFIX. - - - - DLINKFLAGSUFFIX. - - + +DLINKFLAGSUFFIX. + + DOCBOOK_DEFAULT_XSL_EPUB @@ -1507,39 +1313,31 @@ for saxon and saxon-xslt, respectively. List of paths to search for import modules. - - - List of paths to search for import modules. - - - - List of paths to search for import modules. - DRPATHPREFIX - - DRPATHPREFIX. - - + +DRPATHPREFIX. + + DRPATHSUFFIX - - DRPATHSUFFIX. - - + +DRPATHSUFFIX. + + DShLibSonameGenerator - - DShLibSonameGenerator. - - + +DShLibSonameGenerator. + + DSUFFIXES @@ -1558,50 +1356,26 @@ The default list is: DVERPREFIX - - DVERPREFIX. - - - - DVERPREFIX. - - - - DVERPREFIX. - - + +DVERPREFIX. + + DVERSIONS - List of version tags to enable when compiling. - - - - List of version tags to enable when compiling. - - - - List of version tags to enable when compiling. +List of version tags to enable when compiling. DVERSUFFIX - - DVERSUFFIX. - - - - DVERSUFFIX. - - - - DVERSUFFIX. - - + +DVERSUFFIX. + + DVIPDF @@ -3128,7 +2902,7 @@ to '.dll'. Used to override $SHLIBVERSION/$LDMODULEVERSION when generating versioned import library for a shared library/loadable module. If undefined, the $SHLIBVERSION/$LDMODULEVERSION is used to -determine the version of versioned import library. +determine the version of versioned import library. @@ -3298,7 +3072,7 @@ The command line used to call the Java archive tool. The string displayed when the Java archive tool is called -If this is not set, then $JARCOM (the command line) is displayed. +If this is not set, then $JARCOM (the command line) is displayed. @@ -3308,7 +3082,7 @@ env = Environment(JARCOMSTR = "JARchiving $SOURCES into $TARGET") The string displayed when the Java archive tool is called -If this is not set, then $JARCOM (the command line) is displayed. +If this is not set, then $JARCOM (the command line) is displayed. @@ -3672,6 +3446,17 @@ On other systems, this is the same as $LDMODULECOM (the command line) is displayed. + + + + LDMODULEEMITTER + + +Contains the emitter specification for the +LoadableModule builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. + @@ -3846,7 +3631,10 @@ when the $_LIBDIRFLAGS va LIBEMITTER -TODO +Contains the emitter specification for the +StaticLibrary builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. @@ -4239,7 +4027,7 @@ The command line used to pass files to the Microsoft IDL compiler. The string displayed when -the Microsoft IDL copmiler is called. +the Microsoft IDL compiler is called. If this is not set, then $MIDLCOM (the command line) is displayed. @@ -5336,7 +5124,10 @@ for example. PROGEMITTER -TODO +Contains the emitter specification for the +Program builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. @@ -6031,9 +5822,9 @@ appending to this list, although the more flexible approach is to associate scanners with a specific Builder. -See the sections "Builder Objects" -and "Scanner Objects," -below, for more information. +See the manpage sections "Builder Objects" +and "Scanner Objects" +for more information. @@ -6149,18 +5940,8 @@ to generate shared-library objects. SHDC - The name of the compiler to use when compiling D source - destined to be in a shared objects. - - - - The name of the compiler to use when compiling D source - destined to be in a shared objects. - - - - The name of the compiler to use when compiling D source - destined to be in a shared objects. +The name of the compiler to use when compiling D source +destined to be in a shared objects. @@ -6168,50 +5949,32 @@ to generate shared-library objects. SHDCOM - The command line to use when compiling code to be part of shared objects. - - - - The command line to use when compiling code to be part of shared objects. - - - - The command line to use when compiling code to be part of shared objects. +The command line to use when compiling code to be part of shared objects. SHDLIBVERSION - - SHDLIBVERSION. - - + +SHDLIBVERSION. + + SHDLIBVERSIONFLAGS - - SHDLIBVERSIONFLAGS. - - + +SHDLIBVERSIONFLAGS. + + SHDLINK - The linker to use when creating shared objects for code bases - include D sources. - - - - The linker to use when creating shared objects for code bases - include D sources. - - - - The linker to use when creating shared objects for code bases - include D sources. +The linker to use when creating shared objects for code bases +include D sources. @@ -6219,15 +5982,7 @@ to generate shared-library objects. SHDLINKCOM - The command line to use when generating shared objects. - - - - The command line to use when generating shared objects. - - - - The command line to use when generating shared objects. +The command line to use when generating shared objects. @@ -6235,15 +5990,7 @@ to generate shared-library objects. SHDLINKFLAGS - The list of flags to use when generating a shared object. - - - - The list of flags to use when generating a shared object. - - - - The list of flags to use when generating a shared object. +The list of flags to use when generating a shared object. @@ -6737,7 +6484,10 @@ If this is not set, then -TODO +Contains the emitter specification for the +SharedLibrary builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. @@ -6781,23 +6531,13 @@ The suffix used for shared library file names. When this construction variable is defined, a versioned shared library -is created by SharedLibrary builder. This activates the +is created by the SharedLibrary builder. This activates the $_SHLIBVERSIONFLAGS and thus modifies the $SHLINKCOM as required, adds the version number to the library name, and creates the symlinks that are needed. $SHLIBVERSION versions should exist as alpha-numeric, decimal-delimited values as defined by the regular expression "\w+[\.\w+]*". Example $SHLIBVERSION values include '1', '1.2.3', and '1.2.gitaa412c8b'. - - - - SHLIBVERSIONFLAGS - - -Extra flags added to $SHLINKCOM when building versioned -SharedLibrary. These flags are only used when $SHLIBVERSION is -set. - @@ -6811,6 +6551,16 @@ and some extra dynamically generated options (such as -Wl,-soname=$_SHLIBSONAME. It is unused by "plain" (unversioned) shared libraries. + + + + SHLIBVERSIONFLAGS + + +Extra flags added to $SHLINKCOM when building versioned +SharedLibrary. These flags are only used when $SHLIBVERSION is +set. + @@ -6901,7 +6651,8 @@ The variable is used, for example, by A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -6924,7 +6675,8 @@ field in the controlling information for Ipkg and RPM packages. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -7268,7 +7020,8 @@ General options passed to the tar archiver. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -7332,7 +7085,8 @@ For example, if you want to compile 64-bit binaries, you would set A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -7465,7 +7219,8 @@ that are part of this construction environment. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -7475,7 +7230,8 @@ that may not be set or used in a construction environment. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). diff --git a/doc/generated/variables.mod b/doc/generated/variables.mod index 372a15f..ba92aa9 100644 --- a/doc/generated/variables.mod +++ b/doc/generated/variables.mod @@ -251,6 +251,7 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $LDMODULE"> $LDMODULECOM"> $LDMODULECOMSTR"> +$LDMODULEEMITTER"> $LDMODULEFLAGS"> $LDMODULENOVERSIONSYMLINKS"> $LDMODULEPREFIX"> @@ -504,8 +505,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $_SHLIBSONAME"> $SHLIBSUFFIX"> $SHLIBVERSION"> -$SHLIBVERSIONFLAGS"> $_SHLIBVERSIONFLAGS"> +$SHLIBVERSIONFLAGS"> $SHLINK"> $SHLINKCOM"> $SHLINKCOMSTR"> @@ -891,6 +892,7 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $LDMODULE"> $LDMODULECOM"> $LDMODULECOMSTR"> +$LDMODULEEMITTER"> $LDMODULEFLAGS"> $LDMODULENOVERSIONSYMLINKS"> $LDMODULEPREFIX"> @@ -1144,8 +1146,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $_SHLIBSONAME"> $SHLIBSUFFIX"> $SHLIBVERSION"> -$SHLIBVERSIONFLAGS"> $_SHLIBVERSIONFLAGS"> +$SHLIBVERSIONFLAGS"> $SHLINK"> $SHLINKCOM"> $SHLINKCOMSTR"> diff --git a/doc/man/scons-time.xml b/doc/man/scons-time.xml index 2632e41..b973dba 100644 --- a/doc/man/scons-time.xml +++ b/doc/man/scons-time.xml @@ -32,8 +32,8 @@ SCONS-TIME 1 -SCons 3.1.1 -SCons 3.1.1 +SCons 3.1.2 +SCons 3.1.2 scons-time @@ -53,7 +53,6 @@ Generating Timing Information scons-time run [] -[PROJECT] [FILE] [NUMBER] [OUTDIR] @@ -644,7 +643,6 @@ files. The run Subcommand scons-time run [] -[PROJECT] [FILE] [NUMBER] [OUTDIR] @@ -727,31 +725,6 @@ this should be an up-to-date, "do nothing" rebuild. scons-time run subcommand supports the following options: - - --aegis=PROJECT - -Specifies the Aegis -PROJECT -from which the -version(s) of -scons -being timed will be extracted. -When - -is specified, the -NUMBER -option specifies delta numbers -that will be tested. -Output from each invocation run will be placed in file -names that match the Aegis delta numbers. -If the - -option is not specified, -then the default behavior is to time the -tip of the specified -PROJECT. - - -f FILE, --file=FILE @@ -798,14 +771,6 @@ the log files and profile outputs generated by this run. -When used in conjunction with the -PROJECT -option, -NUMBER -specifies one or more comma-separated Aegis delta numbers -that will be retrieved automatically from the specified Aegis -PROJECT. - When used in conjunction with the URL option, @@ -1056,24 +1021,6 @@ and provides a handy way to "shrink-wrap" the necessary information for producing (and reporting) consistent timing runs for a given configuration. - - aegis - -The Aegis executable for extracting deltas. -The default is simply -aegis. - - - - aegis_project - -The Aegis project from which deltas should be extracted. -The default is whatever is specified -with the - -command-line option. - - archive_list diff --git a/doc/man/scons.xml b/doc/man/scons.xml index 87344cc..20e9d84 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -75,8 +75,8 @@ SCONS 1 -SCons 3.1.1 -SCons 3.1.1 +SCons 3.1.2 +SCons 3.1.2 scons @@ -209,12 +209,12 @@ that you want to use to build your target files are not in standard system locations, scons will not find them unless -you explicitly set the PATH +you explicitly set the PATH to include those locations. Whenever you create an scons construction environment, -you can propagate the value of PATH +you can propagate the value of PATH from your external environment as follows: @@ -223,13 +223,20 @@ env = Environment(ENV = {'PATH' : os.environ['PATH']}) Similarly, if the commands use external environment variables -like $PATH, $HOME, $JAVA_HOME, $LANG, $SHELL, $TERM, etc., +like +PATH, +HOME, +JAVA_HOME, +LANG, +SHELL, +TERM, +etc., these variables can also be explicitly propagated: import os -env = Environment(ENV = {'PATH' : os.environ['PATH'], - 'HOME' : os.environ['HOME']}) +env = Environment(ENV = {'PATH': os.environ['PATH'], + 'HOME': os.environ['HOME']}) Or you may explicitly propagate the invoking user's @@ -679,19 +686,32 @@ option except for the way default targets are handled. When this option is used and no targets are specified on the command line, all default targets are built, whether or not they are below the current directory. - + - --debug=type + --debug=type[,type...] Debug the build process. -type[,type...] -specifies what type of debugging. Multiple types may be specified, -separated by commas. The following types are valid: +type +specifies the kind of debugging info to emit. +Multiple types may be specified, separated by commas. +The following entries show the recognized types: + + + + --debug=action-timestamps + +Prints additional time profiling information. For +each command, shows the absolute start and end times. +This may be useful in debugging parallel builds. +Implies the option. + +Since &scons; 3.1. + --debug=count @@ -717,17 +737,6 @@ files). its source file. Includes debugging info for unlinking stale variant files, as well as unlinking old targets before building them. - - - - --debug=dtree - -A synonym for the newer - -option. -This will be deprecated in some future release -and ultimately removed. - @@ -783,13 +792,6 @@ instead of recomputing them each time they're needed. before and after reading the SConscript files and before and after building targets. - - - - --debug=nomemoizer - -A deprecated option preserved for backwards compatibility. - @@ -846,17 +848,6 @@ Building myprog.o with action(s): Prints an internal Python stack trace when encountering an otherwise unexplained error. - - - - --debug=stree - -A synonym for the newer - -option. -This will be deprecated in some future release -and ultimately removed. - @@ -912,20 +903,9 @@ since multiple build commands and intervening SCons processing should take place in parallel.) - - - --debug=tree - -A synonym for the newer - -option. -This will be deprecated in some future release -and ultimately removed. - - --diskcheck=types @@ -1113,6 +1093,18 @@ This implies + + + --install-sandbox=path + + +When using the &Install; functions, prepend path +to the installation paths such that all installed files will be placed +underneath path. + + + + --interactive @@ -1803,41 +1795,6 @@ Warnings for some specific deprecated features may be enabled or disabled individually; see below. -
- - - --warn=deprecated-copy, --warn=no-deprecated-copy - -Enables or disables warnings about use of the deprecated -env.Copy() -method. - - - - - --warn=deprecated-source-signatures, --warn=no-deprecated-source-signatures - -Enables or disables warnings about use of the deprecated -SourceSignatures() -function or -env.SourceSignatures() -method. - - - - - --warn=deprecated-target-signatures, --warn=no-deprecated-target-signatures - -Enables or disables warnings about use of the deprecated -TargetSignatures() -function or -env.TargetSignatures() -method. - - - -
-
@@ -1914,7 +1871,7 @@ These warnings are enabled by default. feature not working when scons -is run with the python +is run with the Python option or from optimized Python (.pyo) modules. @@ -2041,7 +1998,7 @@ env['BAR'] = 'bar' As a convenience, construction variables may also be set or modified by the -parse_flags +parse_flags keyword argument, which applies the &f-link-env-MergeFlags; method (described below) to the argument value @@ -2112,36 +2069,59 @@ env = Environment(platform = my_platform) Additionally, a specific set of tools with which to initialize the environment -may be specified as an optional keyword argument: +may be specified using the optional keyword argument +tools: -env = Environment(tools = ['msvc', 'lex']) +env = Environment(tools=['msvc', 'lex']) -Non-built-in tools may be specified using the toolpath argument: + +The tools argument overrides +the tool list, it does not add to it, so be +sure to include all the tools you need. +For example if you are building a c/c++ program +you must add a tool for both compiler and linker, +as in tools=['clang', 'link']. +The tool name 'default' can +be used to retain the default list. + + +Non-built-in tools may be specified using the +optional toolpath keyword argument: -env = Environment(tools = ['default', 'foo'], toolpath = ['tools']) +env = Environment(tools=['default', 'foo'], toolpath=['tools']) -This looks for a tool specification in tools/foo.py (as well as -using the ordinary default tools for the platform). foo.py should -have two functions: generate(env, **kw) and exists(env). + +This looks for a tool specification in tools/foo.py +as well as using the ordinary default tools for the platform. + + + +A tool specification must include two functions: +generate(env, **kw) +and exists(env). The -generate() +generate function -modifies the passed-in environment +modifies the environment referenced by env to set up variables so that the tool can be executed; it may use any keyword arguments -that the user supplies (see below) +that the user supplies in kw (see below) to vary its initialization. The -exists() +exists function should return a true value if the tool is available. + + + Tools in the toolpath are used before -any of the built-in ones. For example, adding gcc.py to the toolpath +any of the built-in ones. For example, adding +gcc.py to the toolpath would override the built-in gcc tool. Also note that the toolpath is stored in the environment for use @@ -2149,7 +2129,8 @@ by later calls to Clone() and Tool() -methods: +methods: + base = Environment(toolpath=['custom_path']) @@ -2192,11 +2173,12 @@ or otherwise changing its initialization. def generate(env, **kw): # Sets MY_TOOL to the value of keyword argument 'arg1' or 1. env['MY_TOOL'] = kw.get('arg1', '1') + def exists(env): - return 1 + return True # in SConstruct: -env = Environment(tools = ['default', ('my_tool', {'arg1': 'abc'})], +env = Environment(tools=['default', ('my_tool', {'arg1': 'abc'})], toolpath=['tools']) @@ -2215,7 +2197,7 @@ With a nested tool name the dot represents a directory seperator # namespaced builder -env = Environment(ENV = os.environ, tools = ['SubDir1.SubDir2.SomeTool']) +env = Environment(ENV=os.environ, tools=['SubDir1.SubDir2.SomeTool']) env.SomeTool(targets, sources) # Search Paths @@ -2257,90 +2239,108 @@ env.SomeTool(targets, sources) -Additionally, there is a "tool" named -default -which configures the -environment with a default set of tools for the current platform. - -On posix and cygwin platforms -the GNU tools (e.g. gcc) are preferred by SCons, -on Windows the Microsoft tools (e.g. msvc) -followed by MinGW are preferred by SCons, -and in OS/2 the IBM tools (e.g. icc) are preferred by SCons. -
Builder Methods -Build rules are specified by calling a construction -environment's builder methods. -The arguments to the builder methods are -target -(a list of targets to be built, -usually file names) +You tell scons what to build +by calling Builders, functions which know to take a +particular action when given files of a particular type +to produce a particular result type. scons +defines a number of builders, and you can also write your own. +Builders are attached to a &consenv; as methods, +and the available builder methods are listed as +key-value pairs in the +BUILDERS attribute of the &consenv;. +The available builders can be displayed like this +for debugging purposes: + + + +print("Builders:", list(env['BUILDERS'])) + + + +Builder methods always take two arguments: +target +(a target or a list of targets to be built) and -source -(a list of sources to be built, -usually file names). +source +(a source or list of sources to be used as input +when building), +although in some circumstances, +the target argument can actually be omitted (see below). +Builder methods also take a variety of +keyword arguments, described below. + Because long lists of file names can lead to a lot of quoting, scons -supplies a -Split() +supplies a &Split; global function 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 split() member function of Python strings -but work even if the input isn't a string.) +(These are similar to the Python string split +method, but work even if the input isn't a string.) -Like all Python arguments, -the target and source arguments to a builder method -can be specified either with or without -the "target" and "source" keywords. -When the keywords are omitted, -the target is first, -followed by the source. -The following are equivalent examples of calling the Program builder method: + +The target and source arguments to a builder method +can be specified either as positional arguments, +in which case the target comes first, or as +keyword arguments, using target= +and source=. +The following are equivalent examples of calling the +&Program; builder method: + env.Program('bar', ['bar.c', 'foo.c']) env.Program('bar', Split('bar.c foo.c')) 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 = 'bar.c foo.c'.split()) +env.Program(source=['bar.c', 'foo.c'], target='bar') +env.Program(target='bar', source=Split('bar.c foo.c')) +env.Program(target='bar', source=env.Split('bar.c foo.c')) +env.Program('bar', source='bar.c foo.c'.split()) -Target and source file names -that are not absolute path names -(that is, do not begin with -/ -on POSIX systems -or -\ -on Windows systems, -with or without -an optional drive letter) -are interpreted relative to the directory containing the -SConscript -file being read. -An initial -# -(hash mark) -on a path name means that the rest of the file name -is interpreted relative to -the directory containing -the top-level -SConstruct -file, -even if the -# -is followed by a directory separator character -(slash or backslash). + +Python follows the POSIX pathname convention for path +strings: if a string begins with the operating system pathname separator +(on Windows both the slash and backslash separator work, +and any leading drive specifier is ignored for +the determination) it is considered an absolute path, +otherwise it is a relative path. +If the path string contains no separator characters, +it is searched for as a file in the current directory. If it +contains separator characters, the search follows down +from the starting point, which is the top of the directory tree for +an absolute path and the current directory for a relative path. + + +scons recognizes a third way to specify +path strings: if the string begins with +the # character it is +top-relative - it works like a relative path but the +search follows down from the directory containing the top-level +SConstruct rather than +from the current directory (the # is allowed +to be followed by a pathname separator, which is ignored if +found in that position). +Top-relative paths only work in places where &scons; will +interpret the path (see some examples below). To be +used in other contexts the string will need to be converted +to a relative or absolute path first. + + + +Target and source pathnames can be absolute, relative, or +top-relative. Relative pathnames are searched considering the +directory of the SConscript +file currently being processed as the "current directory". + Examples: @@ -2382,12 +2382,12 @@ executable program or bar.exe (on Windows systems) -from the bar.c source file: +from the bar.c source file: -env.Program(target = 'bar', source = 'bar.c') -env.Program('bar', source = 'bar.c') -env.Program(source = 'bar.c') +env.Program(target='bar', source='bar.c') +env.Program('bar', source='bar.c') +env.Program(source='bar.c') env.Program('bar.c') @@ -2397,28 +2397,31 @@ keyword argument may be specified when calling a Builder. When specified, all source file strings that are not absolute paths +or top-relative paths will be interpreted relative to the specified srcdir. The following example will build the -build/prog +build/prog (or -build/prog.exe +build/prog.exe on Windows) program from the files -src/f1.c +src/f1.c and -src/f2.c: +src/f2.c: + env.Program('build/prog', ['f1.c', 'f2.c'], srcdir='src') -It is possible to override or add construction variables when calling a -builder method by passing additional keyword arguments. -These overridden or added -variables will only be in effect when building the target, so they will not -affect other parts of the build. For example, if you want to add additional -libraries for just one program: +It is possible to override (replace or add) +construction variables when calling a +builder method by passing them as keyword arguments. +These overrides +will only be in effect when building that target, and will not +affect other parts of the build. For example, if you want to specify +some libraries needed by just one program: env.Program('hello', 'hello.c', LIBS=['gl', 'glut']) @@ -2438,7 +2441,7 @@ for dependencies on the non-standard library names; see the descriptions of these variables, below, for more information.) It is also possible to use the -parse_flags +parse_flags keyword argument in an override, to merge command-line style arguments into the appropriate construction variables @@ -2483,8 +2486,7 @@ from SCons.Script import * All builder methods return a list-like object -containing Nodes that -represent the target or targets that will be built. +containing Nodes that will be built. A Node is an internal SCons object @@ -2496,9 +2498,8 @@ can be passed to other builder methods as source(s) or passed to any SCons function or method where a filename would normally be accepted. For example, if it were necessary -to add a specific - -flag when compiling one specific object file: +to add a specific preprocessor define +when compiling one specific object file: bar_obj_list = env.StaticObject('bar.c', CPPDEFINES='-DBAR') @@ -2509,14 +2510,14 @@ env.Program(source = ['foo.c', bar_obj_list, 'main.c']) makes for a more portable build by avoiding having to specify a platform-specific object suffix -when calling the Program() builder method. +when calling the &Program; builder method. -Note that Builder calls will automatically "flatten" +Note that builder calls will automatically "flatten" the source and target file lists, -so it's all right to have the bar_obj list -return by the StaticObject() call +so it's all right to have the bar_obj_list +returned by the &StaticObject; call in the middle of the source file list. -If you need to manipulate a list of lists returned by Builders +If you need to manipulate a list of lists returned by builders directly using Python, you can either build the list by hand: @@ -2528,8 +2529,7 @@ for object in objects: print(str(object)) -Or you can use the -Flatten() +Or you can use the &Flatten; function supplied by scons to create a list containing just the Nodes, which may be more convenient: @@ -2542,23 +2542,23 @@ for object in objects: print(str(object)) -Note also that because Builder calls return +Note also that because builder calls return a list-like object, not an actual Python list, you should not -use the Python -+= -operator to append Builder results to a Python list. +use the Python add +operator (+ or +=) +to append builder results to a Python list. Because the list and the object are different types, Python will not update the original list in place, but will instead create a new Node-list object containing the concatenation of the list -elements and the Builder results. +elements and the builder results. This will cause problems for any other Python variables in your SCons configuration that still hold on to a reference to the original list. -Instead, use the Python -.extend() +Instead, use the Python list +extend method to make sure the list is updated in-place. Example: @@ -2571,14 +2571,14 @@ object_files = [] # # It will not update the object_files list in place. # -# Instead, use the .extend() method: +# Instead, use the list extend method: object_files.extend(Object('bar.c')) The path name for a Node's file may be used -by passing the Node to the Python-builtin -str() +by passing the Node to Python's builtin +str function: @@ -2588,7 +2588,7 @@ print("The path to bar_obj is:", str(bar_obj_list[0])) Note again that because the Builder call returns a list, we have to access the first element in the list -(bar_obj_list[0]) +((bar_obj_list[0])) to get at the Node that actually represents the object file. @@ -2651,7 +2651,12 @@ to use just the filename portion of the targets and source. scons -provides the following builder methods: +predefined the following builder methods. +Depending on the setup of a particular +&consenv; and on the type and software +installation status of the underlying system, +not all builders may be available to that +&consenv;. @@ -3119,11 +3124,12 @@ defined construction variables: method of the construction environment: -dict = env.Dictionary() -dict["CC"] = "cc" +cvars = env.Dictionary() +cvars["CC"] = "cc" -or using the [] operator: +or using the key lookup operator [] +directly on the construction environment: env["CC"] = "cc" @@ -4387,7 +4393,7 @@ functions return and Dir Nodes, respectively. -python objects, respectively. +Python objects, respectively. Those objects have several user-visible attributes and methods that are often useful: @@ -4544,7 +4550,7 @@ incl = Dir('include') f = incl.File('header.h') # Get a Node for a subdirectory within a directory -dist = Dir('project-3.2.1) +dist = Dir('project-3.2.1') src = dist.Dir('src') # Get a Node for a file in the same directory @@ -4919,7 +4925,8 @@ the same target file(s). The default is 0, which means the builder can not be called multiple times for the same target file(s). Calling a builder multiple times for the same target simply adds additional source files to the target; it is not allowed to change the environment associated -with the target, specify addition environment overrides, or associate a different +with the target, specify additional environment overrides, +or associate a different builder with the target. @@ -5404,17 +5411,15 @@ a = Action(build_it, varlist=['XXX']) The -Action() +&Action; global function can be passed the following optional keyword arguments to modify the Action object's behavior: - -chdir -The -chdir -keyword argument specifies that + +chdir +specifies that scons will execute the action after changing to the specified directory. If the @@ -5459,15 +5464,9 @@ a = Action("build < ${SOURCE.file} > ${TARGET.file}", chdir=1) - -exitstatfunc -The -Action() -global function -also takes an -exitstatfunc -keyword argument -which specifies a function + +exitstatfunc +specifies a function that is passed the exit status (or return value) from the specified action @@ -5489,11 +5488,9 @@ a = Action("build < ${SOURCE.file} > ${TARGET.file}", -batch_key -The -batch_key -keyword argument can be used -to specify that the Action can create multiple target files + +batch_key +specifies that the Action can create multiple target files by processing multiple independent source files simultaneously. (The canonical example is "batch compilation" of multiple object files @@ -5502,7 +5499,7 @@ to a single invocation of a compiler such as Microsoft's Visual C / C++ compiler.) If the batch_key -argument is any non-False, non-callable Python value, +argument evaluates True and is not a callable object, the configured Action object will cause scons to collect all targets built with the Action object @@ -5534,7 +5531,7 @@ will be used to identify different for batch building. A batch_key -function must take the following arguments: +function must accept the following arguments: @@ -5666,7 +5663,7 @@ sequences of file manipulation without relying on platform-specific external commands: -that + env = Environment(TMPBUILD = '/tmp/builddir') env.Command('foo.out', 'foo.in', @@ -5689,11 +5686,11 @@ which can be octal or string, similar to the bash command. Examples: -Execute(Chmod('file', 0755)) +Execute(Chmod('file', 0o755)) env.Command('foo.out', 'foo.in', [Copy('$TARGET', '$SOURCE'), - Chmod('$TARGET', 0755)]) + Chmod('$TARGET', 0o755)]) Execute(Chmod('file', "ugo+w")) @@ -5826,13 +5823,13 @@ env.Command('marker', 'input_file', Before executing a command, scons -performs construction variable interpolation on the strings that make up -the command line of builders. -Variables are introduced by a -$ +performs construction variable interpolation on the string that makes up +the command line of the builder. +Variables are introduced in such strings by a +$ prefix. -Besides construction variables, scons provides the following -variables for each command execution: +Besides regular construction variables, scons provides the following +special variables for each command execution: @@ -5901,15 +5898,19 @@ from sources that have not changed since the target was last built. -(Note that the above variables are reserved -and may not be set in a construction environment.) - -For example, given the construction variable CC='cc', targets=['foo'], and -sources=['foo.c', 'bar.c']: +Note that the above variables are reserved +and may not be set in a construction environment. + +For example, given the construction variables +CC='cc', +targets=['foo'] +and +sources=['foo.c', 'bar.c']: + action='$CC -c -o $TARGET $SOURCES' @@ -5921,8 +5922,10 @@ action='$CC -c -o $TARGET $SOURCES' cc -c -o foo foo.c bar.c -Variable names may be surrounded by curly braces ({}) -to separate the name from the trailing characters. +Variable names may be surrounded by curly braces +{ } +to separate the name from surrounding characters which +are not part of the name. Within the curly braces, a variable name may have a Python slice subscript appended to select one or more items from a list. @@ -6085,20 +6088,42 @@ may be a callable Python function associated with a construction variable in the environment. The function should -take four arguments: -target -- a list of target nodes, -source -- a list of source nodes, -env -- the construction environment, -for_signature -- a Boolean value that specifies +accept four arguments: + + + + target + +a list of target nodes + + + + source + +a list of source nodes + + + + env + +the construction environment + + + + for_signature + +a Boolean value that specifies whether the function is being called -for generating a build signature. +for generating a build signature. + + + + + SCons will insert whatever the called function returns -into the expanded string: +into the expanded string: + def foo(target, source, env, for_signature): @@ -6179,9 +6204,12 @@ echo Last build occurred . > $TARGET Python Code Substitution -Any python code within -${-} -pairs gets evaluated by python 'eval', with the python globals set to + +Any Python code within curly braces +{ } +and introduced by the variable prefix $ +gets evaluated by the Python eval statement, +with the Python globals set to the current environment's set of construction variables. So in the following case: @@ -6197,14 +6225,20 @@ echo FOO > foo.out echo BAR > foo.out -according to the current value of env['COND'] when the command is -executed. The evaluation occurs when the target is being -built, not when the SConscript is being read. So if env['COND'] is changed +according to the current value of env['COND'] +when the command is executed. +The evaluation takes place when the target is being +built, not when the SConscript is being read. So if +env['COND'] is changed later in the SConscript, the final value will be used. -Here's a more interesting example. Note that all of COND, FOO, and -BAR are environment variables, and their values are substituted into -the final command. FOO is a list, so its elements are interpolated +Here's a more interesting example. Note that all of +COND, +FOO, +and +BAR are construction variables, +and their values are substituted into the final command. +FOO is a list, so its elements are interpolated separated by spaces. @@ -6315,7 +6349,8 @@ might not exist argument is the construction environment for the scan. Fetch values from it using the env.Dictionary() -method. +method or using the key lookup operator +directly on the construction environment. The path @@ -6551,9 +6586,10 @@ do this, in part, by sharing an ability to interpret UNIX-like path names. For example, the Cygwin tools will internally translate a Cygwin path name -like /cygdrive/c/mydir +like /cygdrive/c/mydir to an equivalent Windows pathname -of C:/mydir (equivalent to C:\mydir). +of C:/mydir (equivalent to C:\mydir). + Versions of Python that are built for native Windows execution, @@ -6561,7 +6597,8 @@ such as the python.org and ActiveState versions, do not have the Cygwin path name semantics. This means that using a native Windows version of Python to build compiled programs using Cygwin tools -(such as gcc, bison, and flex) +(such as gcc, bison, +and flex) may yield unpredictable results. "Mixing and matching" in this way can be made to work, @@ -6771,7 +6808,7 @@ env['BUILDERS]['PDFBuilder'] = bld Defining Your Own Scanner Object -The following example shows an extremely simple scanner (the +The following example shows adding an extremely simple scanner (the kfile_scan() function) that doesn't use a search path at all @@ -6796,8 +6833,10 @@ kscan = Scanner(name = 'kfile', function = kfile_scan, argument = None, skeys = ['.k']) -scanners = Environment().Dictionary('SCANNERS') -env = Environment(SCANNERS = scanners + [kscan]) + +scanners = DefaultEnvironment()['SCANNERS'] +scanners.append(kscan) +env = Environment(SCANNERS=scanners) env.Command('foo', 'foo.k', 'kprocess < $SOURCES > $TARGET') @@ -6814,7 +6853,8 @@ you can use the function of your current Environment in order to create nodes on the fly from a sequence of file names with relative paths. -Here is a similar but more complete example that searches +Here is a similar but more complete example that adds +a scanner which searches a path of directories (specified as the MYPATH @@ -6840,15 +6880,16 @@ def my_scan(node, env, path, arg): break return env.File(results) -scanner = Scanner(name = 'myscanner', - function = my_scan, - argument = None, - skeys = ['.x'], - path_function = FindPathDirs('MYPATH') +scanner = Scanner(name='myscanner', + function=my_scan, + argument=None, + skeys=['.x'], + path_function=FindPathDirs('MYPATH') ) -scanners = Environment().Dictionary('SCANNERS') -env = Environment(SCANNERS = scanners + [scanner], - MYPATH = ['incs']) + +scanners = DefaultEnvironment()['SCANNERS'] +scanners.append(scanner) +env = Environment(SCANNERS=scanners, MYPATH=['incs']) env.Command('foo', 'foo.x', 'xprocess < $SOURCES > $TARGET') @@ -6861,8 +6902,8 @@ that will return a list of directories specified in the $MYPATH construction variable. It lets SCons detect the file -incs/foo.inc -, even if +incs/foo.inc, +even if foo.x contains the line include foo.inc @@ -6883,17 +6924,18 @@ def pf(env, dir, target, source, arg): results.append(top_dir + os.sep + p) return results -scanner = Scanner(name = 'myscanner', - function = my_scan, - argument = None, - skeys = ['.x'], - path_function = pf +scanner = Scanner(name='myscanner', + function=my_scan, + argument=None, + skeys=['.x'], + path_function=pf ) -Creating a Hierarchical Build + +Creating a Hierarchical Build Notice that the file names specified in a subdirectory's SConscript @@ -6982,7 +7024,7 @@ value each time we call the SConscript function. SConstruct: - env = Environment(LIBPATH = ['#libA', '#libB']) + env = Environment(LIBPATH=['#libA', '#libB']) Export('env') SConscript('libA/SConscript') SConscript('libB/SConscript') @@ -7001,7 +7043,7 @@ libB/SConscript: Main/SConscript: Import('env') - e = env.Copy(LIBS = ['a', 'b']) + e = env.Clone(LIBS=['a', 'b']) e.Program('foo', Split('m1.c m2.c m3.c')) @@ -7126,22 +7168,62 @@ env.Program('MyApp', ['Foo.cpp', 'Bar.cpp'])
ENVIRONMENT + +In general, &scons; is not controlled by environment +variables set in the shell used to invoke it, leaving it +up to the SConscript file author to import those if desired. +However the following variables are imported by +&scons; itself if set: + + - SCONS_LIB_DIR - -Specifies the directory that contains the SCons Python module directory -(e.g. /home/aroach/scons-src-0.01/src/engine). + SCONS_LIB_DIR + +Specifies the directory that contains the &scons; +Python module directory (for example, +/home/aroach/scons-src-0.01/src/engine). + + - + + SCONSFLAGS + +A string of options that will be used by &scons; +in addition to those passed on the command line. + + - SCONSFLAGS - -A string of options that will be used by scons in addition to those passed -on the command line. + SCONS_CACHE_MSVC_CONFIG + +(Windows only). If set, save the shell environment variables +generated when setting up the Microsoft Visual C++ compiler +(and/or Build Tools) to a file to give these settings, +which are expensive to generate, persistence +across &scons; invocations. +Use of this option is primarily intended to aid performance +in tightly controlled Continuous Integration setups. + +If set to a True-like value ("1", +"true" or +"True") will cache to a file named +.scons_msvc_cache in the user's home directory. +If set to a pathname, will use that pathname for the cache. + +Note: use this cache with caution as it +might be somewhat fragile: while each major toolset version +(e.g. Visual Studio 2017 vs 2019) and architecture pair will get separate +cache entries, if toolset updates cause a change +to settings within a given release series, &scons; will not +detect the change and will reuse old settings. +Remove the cache file in case of problems with this. +&scons; will ignore failures reading or writing the file +and will silently revert to non-cached behavior in such cases. + +Since &scons; 3.1. - + @@ -7157,8 +7239,9 @@ source code. AUTHORS -Originally: Steven Knight <knight@baldmt.com> and Anthony Roach <aroach@electriceyeball.com> -Since 2010: The SCons Development Team <scons-dev@scons.org> +Originally: Steven Knight knight@baldmt.com +and Anthony Roach aroach@electriceyeball.com. +Since 2010: The SCons Development Team scons-dev@scons.org. diff --git a/doc/man/sconsign.xml b/doc/man/sconsign.xml index daaa260..a1308ea 100644 --- a/doc/man/sconsign.xml +++ b/doc/man/sconsign.xml @@ -32,8 +32,8 @@ SCONSIGN 1 -SCons 3.1.1 -SCons 3.1.1 +SCons 3.1.2 +SCons 3.1.2 sconsign diff --git a/doc/scons.mod b/doc/scons.mod index cf46e3b..7a48f5f 100644 --- a/doc/scons.mod +++ b/doc/scons.mod @@ -212,6 +212,7 @@ Import"> Install"> InstallAs"> +InstallVersionedLib"> Link"> ListOption"> ListVariable"> @@ -259,11 +260,8 @@ SetDefault"> SetOption"> SideEffect"> -SourceSignature"> -SourceSignatures"> Split"> Tag"> -TargetSignatures"> Task"> Touch"> UnknownOptions"> diff --git a/doc/user/README b/doc/user/README index 5433ea2..a66d20b 100644 --- a/doc/user/README +++ b/doc/user/README @@ -12,7 +12,7 @@ Writing examples: here's a simple template. env = Environment() - print env.Dump("CC") + print(env.Dump("CC")) diff --git a/doc/user/builders-writing.xml b/doc/user/builders-writing.xml index 2fcb11b..a408479 100644 --- a/doc/user/builders-writing.xml +++ b/doc/user/builders-writing.xml @@ -196,7 +196,7 @@ env.Foo('file.foo', 'file.input') file.input - + cat @@ -309,7 +309,7 @@ file.input hello.c - + cat @@ -389,7 +389,7 @@ file1.input file2.input - + cat @@ -682,7 +682,7 @@ env.Foo('file') file.input - + cat @@ -766,7 +766,7 @@ file.input new_source - + cat @@ -840,7 +840,7 @@ modify1.input modify2.input - + cat diff --git a/doc/user/command-line.xml b/doc/user/command-line.xml index bb1d32b..e14ed07 100644 --- a/doc/user/command-line.xml +++ b/doc/user/command-line.xml @@ -2,7 +2,7 @@ %scons; - + %builders-mod; @@ -89,7 +89,7 @@ all of the command-line variable settings, the ability to apply command-line variable settings to construction environments, - and functions for configuring + and functions for configuring specific types of variables (Boolean values, path names, etc.) with automatic validation of the user's specified values. @@ -599,24 +599,30 @@ foo.in &SCons; also allows you to define your own command-line options with the &AddOption; function. The &AddOption; function takes the same arguments - as the optparse.add_option function - from the standard Python library. + as the add_option method + from the standard Python library module optparse. The &AddOption; function is, in fact, implemented using a subclass - of the optparse.OptionParser. + of optparse.OptionParser. + + + Once you have added a custom command-line option with the &AddOption; function, the value of the option (if any) is immediately available using the standard &GetOption; function. + + &SetOption; is not currently supported for + options added with &AddOption;. @@ -678,6 +684,47 @@ foo.in scons -Q -n --prefix=/tmp/install + + + Option-arguments separated from long options by whitespace, + rather than by an =, cannot be correctly + resolved by scons. + While --input=ARG + is clearly opt followed by arg, for --input ARG + it is not possible to tell without instructions whether + ARG is an argument belonging to the + input option or a positional argument. + scons treats positional arguments as either + command-line build options or command-line targets + which are made available for use in an &SConscript; + (see the immediately following sections for details). + Thus, they must be collected before &SConscript; processing + takes place. Since &AddOption; calls, which provide + the processing instructions to resolve any ambiguity, + happen in an &SConscript;, + scons does not know in time + for options added this way, and unexpected things will happen, + such as option-arguments assigned as targets and/or exceptions + due to missing option-arguments. + + + As a result, this usage style should be avoided when invoking + scons. For single-argument + options, use the --input=ARG form on the + command line. For multiple-argument options + (nargs greater than one), + set nargs to one in + &AddOption; calls and either: combine the option-arguments into one word + with a separator, and parse the result in your own code + (see the built-in --debug option, which + allows specifying multiple arguments as a single comma-separated + word, for an example of such usage); or allow the option to + be specified multiple times by setting + action='append'. Both methods can be + supported at the same time. + + + @@ -1132,12 +1179,12 @@ vars = Variables('custom.py', ARGUMENTS) - + where values in the option file &custom_py; get overwritten by the ones specified on the command line. - +
diff --git a/doc/user/depends.xml b/doc/user/depends.xml index bb0a142..96a8685 100644 --- a/doc/user/depends.xml +++ b/doc/user/depends.xml @@ -764,185 +764,8 @@ int main() { printf("Hello, world!\n"); } encounter them in older &SConscript; files. - -
- The &SourceSignatures; Function - - - - The &SourceSignatures; function is fairly straightforward, - and supports two different argument values - to configure whether source file changes should be decided - using MD5 signatures: - - - - -Program('hello.c') -SourceSignatures('MD5') - - - - - Or using time stamps: - - - - -Program('hello.c') -SourceSignatures('timestamp') - - - - - These are roughly equivalent to specifying - Decider('MD5') - or - Decider('timestamp-match'), - respectively, - although it only affects how SCons makes - decisions about dependencies on - source files--that is, - files that are not built from any other files. - - - -
- -
- The &TargetSignatures; Function - - - - The &TargetSignatures; function - specifies how &SCons; decides - when a target file has changed - when it is used as a - dependency of (input to) another target--that is, - the &TargetSignatures; function configures - how the signatures of "intermediate" target files - are used when deciding if a "downstream" target file - must be rebuilt. - - This easily-overlooked distinction between - how &SCons; decides if the target itself must be rebuilt - and how the target is then used to decide if a different - target must be rebuilt is one of the confusing - things that has led to the &TargetSignatures; - and &SourceSignatures; functions being - replaced by the simpler &Decider; function. - - - - - - - The &TargetSignatures; function supports the same - 'MD5' and 'timestamp' - argument values that are supported by the &SourceSignatures;, - with the same meanings, but applied to target files. - That is, in the example: - - - - -Program('hello.c') -TargetSignatures('MD5') - - - - - The MD5 checksum of the &hello_o; target file - will be used to decide if it has changed since the last - time the "downstream" &hello; target file was built. - And in the example: - - - - -Program('hello.c') -TargetSignatures('timestamp') - - - - - The modification time of the &hello_o; target file - will be used to decide if it has changed since the last - time the "downstream" &hello; target file was built. - - - - - - The &TargetSignatures; function supports - two additional argument values: - 'source' and 'build'. - The 'source' argument - specifies that decisions involving - whether target files have changed - since a previous build - should use the same behavior - for the decisions configured for source files - (using the &SourceSignatures; function). - So in the example: - - - - -Program('hello.c') -TargetSignatures('source') -SourceSignatures('timestamp') - - - - - All files, both targets and sources, - will use modification times - when deciding if an input file - has changed since the last - time a target was built. - - - - - - Lastly, the 'build' argument - specifies that &SCons; should examine - the build status of a target file - and always rebuild a "downstream" target - if the target file was itself rebuilt, - without re-examining the contents or timestamp - of the newly-built target file. - If the target file was not rebuilt during - this &scons; invocation, - then the target file will be examined - the same way as configured by - the &SourceSignature; call - to decide if it has changed. - - - - - - This mimics the behavior of - build signatures - in earlier versions of &SCons;. - A &buildsignature; re-combined - signatures of all the input files - that went into making the target file, - so that the target file itself - did not need to have its contents read - to compute an MD5 signature. - This can improve performance for some configurations, - but is generally not as effective as using - Decider('MD5-timestamp'). - - - -
-
- +
Implicit Dependencies: The &cv-CPPPATH; Construction Variable diff --git a/doc/user/environments.xml b/doc/user/environments.xml index ede9bc3..5df58c5 100644 --- a/doc/user/environments.xml +++ b/doc/user/environments.xml @@ -618,7 +618,7 @@ int main() { } - You can fetch individual construction variables + You can fetch individual &consvars; using the normal syntax for accessing individual named items in a Python dictionary: @@ -645,20 +645,21 @@ print("CC is: %s"%env['CC']) - A construction environment, however, - is actually an object with associated methods, etc. + A &consenv; + is actually an object with associated methods and + attributes. If you want to have direct access to only the - dictionary of construction variables, + dictionary of &consvars; you can fetch this using the &Dictionary; method: -env = Environment(FOO = 'foo', BAR = 'bar') -dict = env.Dictionary() +env = Environment(FOO='foo', BAR='bar') +cvars = env.Dictionary() for key in ['OBJSUFFIX', 'LIBSUFFIX', 'PROGSUFFIX']: - print("key = %s, value = %s" % (key, dict[key])) + print("key = %s, value = %s" % (key, cvars[key])) @@ -687,7 +688,7 @@ for key in ['OBJSUFFIX', 'LIBSUFFIX', 'PROGSUFFIX']: If you want to loop and print the values of - all of the construction variables in a construction environment, + all of the &consvars; in a &consenv;, the Python code to do that in sorted order might look something like: @@ -698,6 +699,16 @@ for item in sorted(env.Dictionary().items()): print("construction variable = '%s', value = '%s'" % item) + + It should be noted that for the previous example, there is actually + a &consenv; method that does the same thing more simply, + and tries to format the output nicely as well: + + +env = Environment() +print(env.Dump()) + +
@@ -706,10 +717,10 @@ for item in sorted(env.Dictionary().items()): Another way to get information from - a construction environment + a &consenv; is to use the &subst; method on a string containing $ expansions - of construction variable names. + of &consvar; names. As a simple example, the example from the previous section that used @@ -728,7 +739,7 @@ print("CC is: %s"%env.subst('$CC')) One advantage of using &subst; to expand strings is - that construction variables + that &consvars; in the result get re-expanded until there are no expansions left in the string. So a simple fetch of a value like @@ -875,33 +886,30 @@ print("value is: %s"%env.subst( '->${1 / 0}<-' )) All of the &Builder; functions that we've introduced so far, - like &Program; and &Library;, - actually use a default &consenv; - that contains settings - for the various compilers - and other tools that - &SCons; configures by default, - or otherwise knows about - and has discovered on your system. - The goal of the default construction environment - is to make many configurations to "just work" - to build software using - readily available tools + like &Program; and &Library;, use a &consenv; + that contains settings for the various compilers + and other tools that &SCons; configures by default, + or otherwise knows about and has discovered on your system. + If not invoked as methods of a specific &consenv;, + they use the default &consenv; + The goal of the default &consenv; + is to make many configurations "just work" + to build software using readily available tools with a minimum of configuration changes. - You can, however, control the settings - in the default construction environment + If needed, you can control the default &consenv; by using the &DefaultEnvironment; function - to initialize various settings: + to initialize various settings by passing + them as keyword arguments: -DefaultEnvironment(CC = '/usr/local/bin/gcc') +DefaultEnvironment(CC='/usr/local/bin/gcc') @@ -917,15 +925,15 @@ DefaultEnvironment(CC = '/usr/local/bin/gcc') - Note that the &DefaultEnvironment; function - returns the initialized - default construction environment object, - which can then be manipulated like any - other construction environment. - So the following - would be equivalent to the - previous example, - setting the &cv-CC; + The &DefaultEnvironment; function + returns the initialized default &consenv; object, + which can then be manipulated like any other &consenv; + (note that the default environment works like a singleton - + it can have only one instance - so the keyword arguments + are processed only on the first call. On any subsequent + call the existing object is returned). + So the following would be equivalent to the + previous example, setting the &cv-CC; variable to /usr/local/bin/gcc but as a separate step after the default construction environment has been initialized: @@ -960,8 +968,8 @@ env['CC'] = '/usr/local/bin/gcc' -env = DefaultEnvironment(tools = ['gcc', 'gnulink'], - CC = '/usr/local/bin/gcc') +env = DefaultEnvironment(tools=['gcc', 'gnulink'], + CC='/usr/local/bin/gcc') @@ -983,9 +991,8 @@ env = DefaultEnvironment(tools = ['gcc', 'gnulink'], - The real advantage of construction environments - is that you can create as many different construction - environments as you need, + The real advantage of &consenvs; + is that you can create as many different ones as you need, each tailored to a different way to build some piece of software or other file. If, for example, we need to build @@ -1018,7 +1025,7 @@ int main() { } - We can even use multiple construction environments to build + We can even use multiple &consenvs; to build multiple versions of a single program. If you do this by simply trying to use the &b-link-Program; builder with both environments, though, @@ -1641,7 +1648,7 @@ env['ENV']['PATH'] = '/usr/local/bin:/bin:/usr/bin' env = Environment() env.Command('foo', [], '__ROOT__/usr/bin/printenv.py') - + #!/usr/bin/env python import os import sys diff --git a/doc/user/factories.xml b/doc/user/factories.xml index 43e417b..0756ad0 100644 --- a/doc/user/factories.xml +++ b/doc/user/factories.xml @@ -161,7 +161,7 @@ env['ENV']['PATH'] = env['ENV']['PATH'] + os.pathsep + os.getcwd() SConscript('S') file.in - + touch $* @@ -231,7 +231,7 @@ env['ENV']['PATH'] = env['ENV']['PATH'] + os.pathsep + os.getcwd() SConscript('S') file.in - + touch $* @@ -325,7 +325,7 @@ env['ENV']['PATH'] = env['ENV']['PATH'] + os.pathsep + os.getcwd() SConscript('S') file.in - + touch $* @@ -416,7 +416,7 @@ env['ENV']['PATH'] = env['ENV']['PATH'] + os.pathsep + os.getcwd() SConscript('S') file.in - + touch $* @@ -452,7 +452,7 @@ touch $* Command("file.out", "file.in", [ Copy("$TARGET", "$SOURCE"), - Chmod("$TARGET", 0755), + Chmod("$TARGET", 0o755), ]) file.in diff --git a/doc/user/file-removal.xml b/doc/user/file-removal.xml index fe38cf7..e772eeb 100644 --- a/doc/user/file-removal.xml +++ b/doc/user/file-removal.xml @@ -214,7 +214,7 @@ foo.in foo.log - + cat $3 > $2 diff --git a/doc/user/install.xml b/doc/user/install.xml index b3cb9dd..d977e6b 100644 --- a/doc/user/install.xml +++ b/doc/user/install.xml @@ -2,7 +2,7 @@ %scons; - + %builders-mod; @@ -11,7 +11,7 @@ %tools-mod; %variables-mod; - + ]> - Lastly, if you have multiple files that all + If you have multiple files that all need to be installed with different file names, you can either call the &InstallAs; function multiple times, or as a shorthand, @@ -268,4 +268,66 @@ int main() { printf("Goodbye, world!\n"); }
+
+ Installing a Shared Library + + + If a shared library is created with the + &cv-link-SHLIBVERSION; variable set, + &scons; will create symbolic links as needed based on that + variable. To properly install such a library including the + symbolic links, use the &InstallVersionedLib; function. + + + + For example, on a Linux system, this instruction: + + + +foo = env.SharedLibrary(target="foo", source="foo.c", SHLIBVERSION="1.2.3") + + + + Will produce a shared library + libfoo.so.1.2.3 + and symbolic links + libfoo.so and + libfoo.so.1 + which point to + libfoo.so.1.2.3. + You can use the Node returned by the &SharedLibrary; + builder in order to install the library and its + symbolic links in one go without having to list + them individually: + + + +env.InstallVersionedLib(target="lib", source=foo) + + + + +
+ diff --git a/doc/user/mergeflags.xml b/doc/user/mergeflags.xml index d802125..f4438f8 100644 --- a/doc/user/mergeflags.xml +++ b/doc/user/mergeflags.xml @@ -77,7 +77,7 @@ env = Environment() env.Append(CCFLAGS = '-option -O3 -O1') flags = { 'CCFLAGS' : '-whatever -O3' } env.MergeFlags(flags) -print env['CCFLAGS'] +print(env['CCFLAGS'])
@@ -104,7 +104,7 @@ env = Environment() env.Append(CPPPATH = ['/include', '/usr/local/include', '/usr/include']) flags = { 'CPPPATH' : ['/usr/opt/include', '/usr/local/include'] } env.MergeFlags(flags) -print env['CPPPATH'] +print(env['CPPPATH'])
@@ -138,8 +138,8 @@ env = Environment() env.Append(CCFLAGS = '-option -O3 -O1') env.Append(CPPPATH = ['/include', '/usr/local/include', '/usr/include']) env.MergeFlags('-whatever -I/usr/opt/include -O3 -I/usr/local/include') -print env['CCFLAGS'] -print env['CPPPATH'] +print(env['CCFLAGS']) +print(env['CPPPATH'])
diff --git a/doc/user/output.xml b/doc/user/output.xml index db16393..c0edbca 100644 --- a/doc/user/output.xml +++ b/doc/user/output.xml @@ -309,7 +309,7 @@ Linking foo env = Environment() -if ARGUMENTS.get('VERBOSE') != "1': +if ARGUMENTS.get('VERBOSE') != '1': env['CCCOMSTR'] = "Compiling $TARGET" env['LINKCOMSTR'] = "Linking $TARGET" env.Program('foo.c') diff --git a/doc/user/parseconfig.xml b/doc/user/parseconfig.xml index 096d236..4adb20f 100644 --- a/doc/user/parseconfig.xml +++ b/doc/user/parseconfig.xml @@ -87,7 +87,7 @@ env = Environment() env['CPPPATH'] = ['/lib/compat'] env.ParseConfig("pkg-config x11 --cflags --libs") -print env['CPPPATH'] +print(env['CPPPATH']) @@ -139,7 +139,7 @@ scons: `.' is up to date. env = Environment() env.ParseConfig("pkg-config x11 --cflags --libs") env.ParseConfig("pkg-config x11 --cflags --libs") -print env['CPPPATH'] +print(env['CPPPATH'])
diff --git a/doc/user/parseflags.xml b/doc/user/parseflags.xml index 26313ce..cc31b3b 100644 --- a/doc/user/parseflags.xml +++ b/doc/user/parseflags.xml @@ -80,11 +80,12 @@ +from __future__ import print_function env = Environment() d = env.ParseFlags("-I/opt/include -L/opt/lib -lfoo") for k,v in sorted(d.items()): if v: - print k, v + print(k, v) env.MergeFlags(d) env.Program('f1.c') @@ -119,11 +120,12 @@ int main() { return 0; } +from __future__ import print_function env = Environment() d = env.ParseFlags("-whatever") for k,v in sorted(d.items()): if v: - print k, v + print(k, v) env.MergeFlags(d) env.Program('f1.c') @@ -145,11 +147,12 @@ env.Program('f1.c') +from __future__ import print_function env = Environment() d = env.ParseFlags(["-I/opt/include", ["-L/opt/lib", "-lfoo"]]) for k,v in sorted(d.items()): if v: - print k, v + print(k, v) env.MergeFlags(d) env.Program('f1.c') @@ -172,11 +175,12 @@ int main() { return 0; } +from __future__ import print_function env = Environment() d = env.ParseFlags(["!echo -I/opt/include", "!echo -L/opt/lib", "-lfoo"]) for k,v in sorted(d.items()): if v: - print k, v + print(k, v) env.MergeFlags(d) env.Program('f1.c') diff --git a/doc/user/separate.xml b/doc/user/separate.xml index 26500d6..3640fef 100644 --- a/doc/user/separate.xml +++ b/doc/user/separate.xml @@ -149,10 +149,8 @@ program using the F path name. One historical note: the &VariantDir; function - used to be called &BuildDir;. - That name is still supported - but has been deprecated - because the &SCons; functionality + used to be called &BuildDir;, a name which was + removed because the &SCons; functionality differs from the model of a "build directory" implemented by other build systems like the GNU Autotools. diff --git a/doc/user/sideeffect.xml b/doc/user/sideeffect.xml index e630e4f..e8f0614 100644 --- a/doc/user/sideeffect.xml +++ b/doc/user/sideeffect.xml @@ -164,7 +164,7 @@ env.SideEffect('logfile.txt', f1 + f2)
file1.in file2.in - + cat diff --git a/doc/user/troubleshoot.xml b/doc/user/troubleshoot.xml index 606c727..a9da534 100644 --- a/doc/user/troubleshoot.xml +++ b/doc/user/troubleshoot.xml @@ -289,7 +289,7 @@ file3.c env = Environment() -print env.Dump() +print(env.Dump()) @@ -349,7 +349,7 @@ print env.Dump() env = Environment() -print env.Dump('ENV') +print(env.Dump('ENV')) -- cgit v1.2.3