From f7e5d2b46b03cc4bc09c38f7e0873378bb9c3b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 21 Jun 2015 07:55:15 +0200 Subject: Imported Upstream version 2.3.5 --- doc/generated/builders.gen | 528 ++++++++++++++++++++++++++------------------- 1 file changed, 304 insertions(+), 224 deletions(-) (limited to 'doc/generated/builders.gen') diff --git a/doc/generated/builders.gen b/doc/generated/builders.gen index 3d534b0..02dc04b 100644 --- a/doc/generated/builders.gen +++ b/doc/generated/builders.gen @@ -486,6 +486,14 @@ and source arguments list different numbers of files or directories. + + +env.InstallAs(target = '/usr/local/bin/foo', + source = 'foo_debug') +env.InstallAs(target = ['../lib/libfoo.a', '../lib/libbar.a'], + source = ['libFOO.a', 'libBAR.a']) + + @@ -500,14 +508,17 @@ arguments list different numbers of files or directories. Installs a versioned shared library. The $SHLIBVERSION construction variable should be defined in the environment to confirm the version number in the library name. +If $SHLIBVERSION is not defined a warning will be issued +and the name of the library will be parsed to derive the version. The symlinks appropriate to the architecture will be generated. -env.InstallAs(target = '/usr/local/bin/foo', - source = 'foo_debug') -env.InstallAs(target = ['../lib/libfoo.a', '../lib/libbar.a'], - source = ['libFOO.a', 'libBAR.a']) +env.InstallVersionedLib(target = '/usr/local/bin/foo', + source = 'libxyz.1.5.2.so') +env.InstallVersionedLib(target = '/usr/local/bin/foo', + source = 'libxyz.1.5.2.so', + SHLIBVERSION='1.5.2') @@ -832,161 +843,105 @@ Compile files for languages defined in LINGUAS file env.MSVSProject() - - -Builds a Microsoft Visual Studio project file, -and by default builds a solution file as well. - - - -This builds a Visual Studio project file, based on the version of -Visual Studio that is configured (either the latest installed version, -or the version specified by -$MSVS_VERSION -in the Environment constructor). -For Visual Studio 6, it will generate a -.dsp -file. -For Visual Studio 7 (.NET) and later versions, it will generate a -.vcproj -file. - - - -By default, -this also generates a solution file -for the specified project, -a -.dsw -file for Visual Studio 6 -or a -.sln -file for Visual Studio 7 (.NET). -This behavior may be disabled by specifying -auto_build_solution=0 -when you call -MSVSProject, -in which case you presumably want to -build the solution file(s) -by calling the -MSVSSolution -Builder (see below). - - - -The MSVSProject builder -takes several lists of filenames -to be placed into the project file. -These are currently limited to -srcs, -incs, -localincs, -resources, -and -misc. -These are pretty self-explanatory, but it should be noted that these -lists are added to the $SOURCES construction variable as strings, -NOT as SCons File Nodes. This is because they represent file -names to be added to the project file, not the source files used to -build the project file. - - - -The above filename lists are all optional, -although at least one must be specified -for the resulting project file to be non-empty. - - - -In addition to the above lists of values, -the following values may be specified: - - - -target: -The name of the target -.dsp -or -.vcproj -file. -The correct -suffix for the version of Visual Studio must be used, -but the -$MSVSPROJECTSUFFIX -construction variable -will be defined to the correct value (see example below). - - - -variant: -The name of this particular variant. -For Visual Studio 7 projects, -this can also be a list of variant names. -These are typically things like "Debug" or "Release", but really -can be anything you want. -For Visual Studio 7 projects, -they may also specify a target platform -separated from the variant name by a -| -(vertical pipe) -character: -Debug|Xbox. -The default target platform is Win32. -Multiple calls to -MSVSProject -with different variants are allowed; -all variants will be added to the project file with their appropriate -build targets and sources. - - - -buildtarget: -An optional string, node, or list of strings or nodes -(one per build variant), to tell the Visual Studio debugger -what output target to use in what build variant. -The number of -buildtarget -entries must match the number of -variant -entries. - - - -runfile: -The name of the file that Visual Studio 7 and later -will run and debug. -This appears as the value of the -Output -field in the resutling Visual Studio project file. -If this is not specified, -the default is the same as the specified -buildtarget -value. - - - -Note that because SCons always executes its build commands -from the directory in which the SConstruct file is located, -if you generate a project file in a different directory -than the SConstruct directory, -users will not be able to double-click -on the file name in compilation error messages -displayed in the Visual Studio console output window. -This can be remedied by adding the -Visual C/C++ -/FC -compiler option to the $CCFLAGS variable -so that the compiler will print -the full path name of any -files that cause compilation errors. - - - -Example usage: - - - -barsrcs = ['bar.cpp'], + Builds a Microsoft Visual Studio project +file, and by default builds a solution file as well. This +builds a Visual Studio project file, based on the version of Visual Studio +that is configured (either the latest installed version, or the version +specified by $MSVS_VERSION in the Environment constructor). For +Visual Studio 6, it will generate a .dsp file. For Visual +Studio 7 (.NET) and later versions, it will generate a +.vcproj file. By default, this also +generates a solution file for the specified project, a +.dsw file for Visual Studio 6 or a +.sln file for Visual Studio 7 (.NET). This behavior may +be disabled by specifying auto_build_solution=0 when you +call MSVSProject, in which case you presumably want to build the solution +file(s) by calling the MSVSSolution Builder (see below). +The MSVSProject builder takes several lists of filenames to be placed into +the project file. These are currently limited to srcs, +incs, localincs, +resources, and misc. These are pretty +self-explanatory, but it should be noted that these lists are added to the +$SOURCES construction variable as strings, NOT as SCons File Nodes. +This is because they represent file names to be added to the project file, not +the source files used to build the project file. The above +filename lists are all optional, although at least one must be specified for +the resulting project file to be non-empty. In addition to the +above lists of values, the following values may be specified: + + + target + + + The name of the target .dsp or + .vcproj file. The correct suffix for the version + of Visual Studio must be used, but the $MSVSPROJECTSUFFIX + construction variable will be defined to the correct value (see + example below). + + + + + variant + + + The name of this particular variant. For Visual Studio 7 + projects, this can also be a list of variant names. These are + typically things like "Debug" or "Release", but really can be anything + you want. For Visual Studio 7 projects, they may also specify a target + platform separated from the variant name by a | + (vertical pipe) character: Debug|Xbox. The default + target platform is Win32. Multiple calls to MSVSProject with + different variants are allowed; all variants will be added to the + project file with their appropriate build targets and + sources. + + + + + cmdargs + + + Additional command line arguments for the different + variants. The number of cmdargs entries must match + the number of variant entries, or be empty (not + specified). If you give only one, it will automatically be propagated + to all variants. + + + + + buildtarget + + + An optional string, node, or list of strings or nodes (one + per build variant), to tell the Visual Studio debugger what output + target to use in what build variant. The number of + buildtarget entries must match the number of + variant entries. + + + + + runfile + + + The name of the file that Visual Studio 7 and later will + run and debug. This appears as the value of the + Output field in the resulting Visual Studio project + file. If this is not specified, the default is the same as the + specified buildtarget value. + + + Note that because SCons always executes its build +commands from the directory in which the SConstruct file is located, if you +generate a project file in a different directory than the SConstruct +directory, users will not be able to double-click on the file name in +compilation error messages displayed in the Visual Studio console output +window. This can be remedied by adding the Visual C/C++ /FC +compiler option to the $CCFLAGS variable so that the compiler will +print the full path name of any files that cause compilation errors. + Example usage: barsrcs = ['bar.cpp'], barincs = ['bar.h'], barlocalincs = ['StdAfx.h'] barresources = ['bar.rc','resource.h'] @@ -1004,7 +959,143 @@ env.MSVSProject(target = 'Bar' + env['MSVSPROJECTSUFFIX'], buildtarget = dll, variant = 'Release') - +Starting with version 2.4 of +SCons it's also possible to specify the optional argument +DebugSettings, which creates files for debugging under +Visual Studio: + + DebugSettings + + + A dictionary of debug settings that get written to the + .vcproj.user or the + .vcxproj.user file, depending on the version + installed. As it is done for cmdargs (see above), you can specify a + DebugSettings dictionary per variant. If you + give only one, it will be propagated to all variants. + + + Currently, only Visual Studio v9.0 and Visual Studio +version v11 are implemented, for other versions no file is generated. To +generate the user file, you just need to add a +DebugSettings dictionary to the environment with the +right parameters for your MSVS version. If the dictionary is empty, or does +not contain any good value, no file will be generated.Following +is a more contrived example, involving the setup of a project for variants and +DebugSettings:# Assuming you store your defaults in a file +vars = Variables('variables.py') +msvcver = vars.args.get('vc', '9') + +# Check command args to force one Microsoft Visual Studio version +if msvcver == '9' or msvcver == '11': + env = Environment(MSVC_VERSION=msvcver+'.0', MSVC_BATCH=False) +else: + env = Environment() + +AddOption('--userfile', action='store_true', dest='userfile', default=False, + help="Create Visual Studio Project user file") + +# +# 1. Configure your Debug Setting dictionary with options you want in the list +# of allowed options, for instance if you want to create a user file to launch +# a specific application for testing your dll with Microsoft Visual Studio 2008 (v9): +# +V9DebugSettings = { + 'Command':'c:\\myapp\\using\\thisdll.exe', + 'WorkingDirectory': 'c:\\myapp\\using\\', + 'CommandArguments': '-p password', +# 'Attach':'false', +# 'DebuggerType':'3', +# 'Remote':'1', +# 'RemoteMachine': None, +# 'RemoteCommand': None, +# 'HttpUrl': None, +# 'PDBPath': None, +# 'SQLDebugging': None, +# 'Environment': '', +# 'EnvironmentMerge':'true', +# 'DebuggerFlavor': None, +# 'MPIRunCommand': None, +# 'MPIRunArguments': None, +# 'MPIRunWorkingDirectory': None, +# 'ApplicationCommand': None, +# 'ApplicationArguments': None, +# 'ShimCommand': None, +# 'MPIAcceptMode': None, +# 'MPIAcceptFilter': None, +} + +# +# 2. Because there are a lot of different options depending on the Microsoft +# Visual Studio version, if you use more than one version you have to +# define a dictionary per version, for instance if you want to create a user +# file to launch a specific application for testing your dll with Microsoft +# Visual Studio 2012 (v11): +# +V10DebugSettings = { + 'LocalDebuggerCommand': 'c:\\myapp\\using\\thisdll.exe', + 'LocalDebuggerWorkingDirectory': 'c:\\myapp\\using\\', + 'LocalDebuggerCommandArguments': '-p password', +# 'LocalDebuggerEnvironment': None, +# 'DebuggerFlavor': 'WindowsLocalDebugger', +# 'LocalDebuggerAttach': None, +# 'LocalDebuggerDebuggerType': None, +# 'LocalDebuggerMergeEnvironment': None, +# 'LocalDebuggerSQLDebugging': None, +# 'RemoteDebuggerCommand': None, +# 'RemoteDebuggerCommandArguments': None, +# 'RemoteDebuggerWorkingDirectory': None, +# 'RemoteDebuggerServerName': None, +# 'RemoteDebuggerConnection': None, +# 'RemoteDebuggerDebuggerType': None, +# 'RemoteDebuggerAttach': None, +# 'RemoteDebuggerSQLDebugging': None, +# 'DeploymentDirectory': None, +# 'AdditionalFiles': None, +# 'RemoteDebuggerDeployDebugCppRuntime': None, +# 'WebBrowserDebuggerHttpUrl': None, +# 'WebBrowserDebuggerDebuggerType': None, +# 'WebServiceDebuggerHttpUrl': None, +# 'WebServiceDebuggerDebuggerType': None, +# 'WebServiceDebuggerSQLDebugging': None, +} + +# +# 3. Select the dictionary you want depending on the version of visual Studio +# Files you want to generate. +# +if not env.GetOption('userfile'): + dbgSettings = None +elif env.get('MSVC_VERSION', None) == '9.0': + dbgSettings = V9DebugSettings +elif env.get('MSVC_VERSION', None) == '11.0': + dbgSettings = V10DebugSettings +else: + dbgSettings = None + +# +# 4. Add the dictionary to the DebugSettings keyword. +# +barsrcs = ['bar.cpp', 'dllmain.cpp', 'stdafx.cpp'] +barincs = ['targetver.h'] +barlocalincs = ['StdAfx.h'] +barresources = ['bar.rc','resource.h'] +barmisc = ['ReadMe.txt'] + +dll = env.SharedLibrary(target = 'bar.dll', + source = barsrcs) + +env.MSVSProject(target = 'Bar' + env['MSVSPROJECTSUFFIX'], + srcs = barsrcs, + incs = barincs, + localincs = barlocalincs, + resources = barresources, + misc = barmisc, + buildtarget = [dll[0]] * 2, + variant = ('Debug|Win32', 'Release|Win32'), + cmdargs = 'vc=%s' % msvcver, + DebugSettings = (dbgSettings, {})) + @@ -1013,70 +1104,54 @@ env.MSVSProject(target = 'Bar' + env['MSVSPROJECTSUFFIX'], env.MSVSSolution() - - -Builds a Microsoft Visual Studio solution file. - - - -This builds a Visual Studio solution file, -based on the version of Visual Studio that is configured -(either the latest installed version, -or the version specified by -$MSVS_VERSION -in the construction environment). -For Visual Studio 6, it will generate a -.dsw -file. -For Visual Studio 7 (.NET), it will -generate a -.sln -file. - - - -The following values must be specified: - - - -target: -The name of the target .dsw or .sln file. The correct -suffix for the version of Visual Studio must be used, but the value -$MSVSSOLUTIONSUFFIX -will be defined to the correct value (see example below). - - - -variant: -The name of this particular variant, or a list of variant -names (the latter is only supported for MSVS 7 solutions). These are -typically things like "Debug" or "Release", but really can be anything -you want. For MSVS 7 they may also specify target platform, like this -"Debug|Xbox". Default platform is Win32. - - - -projects: -A list of project file names, or Project nodes returned by calls to the -MSVSProject -Builder, -to be placed into the solution file. -It should be noted that these file names are NOT added to the $SOURCES -environment variable in form of files, but rather as strings. This -is because they represent file names to be added to the solution file, -not the source files used to build the solution file. - - - -Example Usage: - - - -env.MSVSSolution(target = 'Bar' + env['MSVSSOLUTIONSUFFIX'], - projects = ['bar' + env['MSVSPROJECTSUFFIX']], - variant = 'Release') - - + Builds a Microsoft Visual Studio solution +file. This builds a Visual Studio solution file, based on the +version of Visual Studio that is configured (either the latest installed +version, or the version specified by $MSVS_VERSION in the +construction environment). For Visual Studio 6, it will generate a +.dsw file. For Visual Studio 7 (.NET), it will generate a +.sln file. The following values must be +specified: + + target + + + The name of the target .dsw or .sln file. The correct + suffix for the version of Visual Studio must be used, but the value + $MSVSSOLUTIONSUFFIX will be defined to the correct value (see + example below). + + + + + variant + + + The name of this particular variant, or a list of variant + names (the latter is only supported for MSVS 7 solutions). These are + typically things like "Debug" or "Release", but really can be anything + you want. For MSVS 7 they may also specify target platform, like this + "Debug|Xbox". Default platform is Win32. + + + + + projects + + + A list of project file names, or Project nodes returned by + calls to the MSVSProject Builder, to be placed into the solution + file. It should be noted that these file names are NOT added to the + $SOURCES environment variable in form of files, but rather as strings. + This is because they represent file names to be added to the solution + file, not the source files used to build the solution + file. + + + Example Usage: +env.MSVSSolution(target = 'Bar' + env['MSVSSOLUTIONSUFFIX'], projects = ['bar' ++ env['MSVSPROJECTSUFFIX']], variant = 'Release') + @@ -1925,6 +2000,11 @@ and Y are numbers, and Z is a number but can also contain letters to designate alpha, beta, or release candidate patch levels. + +env.SharedLibrary(target = 'bar', source = ['bar.c', 'foo.o'], SHLIBVERSION='1.5.2') + + + This builder may create multiple links to the library. On a POSIX system, for the shared library libbar.so.2.3.1, the links created would be -- cgit v1.2.3