From 140d836e9cd54fb67b969fd82ef7ed19ba574d40 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Sat, 26 Apr 2014 15:11:58 +0200 Subject: Imported Upstream version 2.3.1 --- src/engine/SCons/Tool/__init__.xml | 130 +++++++++++++++++++++++++++++++------ 1 file changed, 110 insertions(+), 20 deletions(-) (limited to 'src/engine/SCons/Tool/__init__.xml') diff --git a/src/engine/SCons/Tool/__init__.xml b/src/engine/SCons/Tool/__init__.xml index 51ae8b0..deceaa3 100644 --- a/src/engine/SCons/Tool/__init__.xml +++ b/src/engine/SCons/Tool/__init__.xml @@ -1,11 +1,31 @@ + + + +%scons; + +%builders-mod; + +%functions-mod; + +%tools-mod; + +%variables-mod; +]> + + + + Builds a C source file given a lex (.l) or yacc (.y) input file. The suffix specified by the &cv-link-CFILESUFFIX; construction variable @@ -13,18 +33,20 @@ The suffix specified by the &cv-link-CFILESUFFIX; construction variable is automatically added to the target if it is not already present. Example: + - + # builds foo.c env.CFile(target = 'foo.c', source = 'foo.l') # builds bar.c env.CFile(target = 'bar', source = 'bar.y') - + + Builds a C++ source file given a lex (.ll) or yacc (.yy) input file. @@ -33,44 +55,52 @@ The suffix specified by the &cv-link-CXXFILESUFFIX; construction variable is automatically added to the target if it is not already present. Example: + - + # builds foo.cc env.CXXFile(target = 'foo.cc', source = 'foo.ll') # builds bar.cc env.CXXFile(target = 'bar', source = 'bar.yy') - + + A synonym for the &b-StaticLibrary; builder method. + + On most systems, this is the same as &b-SharedLibrary;. On Mac OS X (Darwin) platforms, this creates a loadable module bundle. + + A synonym for the &b-StaticObject; builder method. + + Builds an executable given one or more object files or C, C++, D, or Fortran source files. If any C, C++, D or Fortran source files are specified, @@ -89,15 +119,17 @@ by default, .exe on Windows systems, nothing on POSIX systems) are automatically added to the target if not already present. Example: + - + env.Program(target = 'foo', source = ['foo.o', 'bar.c', 'baz.f']) - + + Builds a shared library (.so on a POSIX system, .dll on Windows) @@ -118,11 +150,13 @@ by default, .dll on Windows systems, .so on POSIX systems) are automatically added to the target if not already present. Example: + - + env.SharedLibrary(target = 'bar', source = ['bar.c', 'foo.o']) - + + On Windows systems, the &b-SharedLibrary; builder method will always build an import @@ -131,7 +165,20 @@ in addition to the shared (.dll) library, adding a .lib library with the same basename if there is not already a .lib file explicitly listed in the targets. + + + +On Cygwin systems, the +&b-SharedLibrary; +builder method will always build an import +(.dll.a) library +in addition to the shared (.dll) library, +adding a .dll.a library with the same basename +if there is not already a .dll.a file explicitly +listed in the targets. + + Any object files listed in the source must have been built for a shared library @@ -140,25 +187,33 @@ must have been built for a shared library builder method). &scons; will raise an error if there is any mismatch. + + On some platforms, there is a distinction between a shared library (loaded automatically by the system to resolve external references) and a loadable module (explicitly loaded by user action). For maximum portability, use the &b-LoadableModule; builder for the latter. + + When the &cv-link-SHLIBVERSION; construction variable is defined a versioned shared library is created. This modifies the &cv-link-SHLINKFLAGS; as required, adds the version number to the library name, and creates the symlinks that are needed. &cv-link-SHLIBVERSION; needs to be of the form X.Y.Z, where X and Y are numbers, and Z is a number but can also contain letters to designate alpha, beta, or release candidate patch levels. + + 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 -libbar.so, libbar.so.2, and libbar.so.2.3; on a Darwin (OSX) system +libbar.so and libbar.so.2; on a Darwin (OSX) system the library would be libbar.2.3.1.dylib and the link would be libbar.dylib. + + On Windows systems, specifying register=1 will cause the .dll to be @@ -171,20 +226,24 @@ to prevent dialogs from popping up and requiring user attention when it is run. If you change &cv-link-REGSVRFLAGS;, be sure to include the option. For example, + - + env.SharedLibrary(target = 'bar', source = ['bar.cxx', 'foo.obj'], register=1) - + + will register bar.dll as a COM object when it is done linking it. + + Builds an object file for inclusion in a shared library. Source files must have one of the same set of extensions @@ -210,24 +269,28 @@ and suffix (specified by the &cv-link-SHOBJSUFFIX; construction variable) are automatically added to the target if not already present. Examples: + - + env.SharedObject(target = 'ddd', source = 'ddd.c') env.SharedObject(target = 'eee.o', source = 'eee.cpp') env.SharedObject(target = 'fff.obj', source = 'fff.for') - + + Note that the source files will be scanned according to the suffix mappings in the SourceFileScanner object. See the section "Scanner Objects," below, for more information. + + Builds a static library given one or more object files or C, C++, D or Fortran source files. If any source files are given, @@ -245,11 +308,13 @@ by default, .lib on Windows systems, .a on POSIX systems) are automatically added to the target if not already present. Example: + - + env.StaticLibrary(target = 'bar', source = ['bar.c', 'foo.o']) - + + Any object files listed in the source must have been built for a static library @@ -258,16 +323,19 @@ must have been built for a static library builder method). &scons; will raise an error if there is any mismatch. + + Builds a static object file from one or more C, C++, D, or Fortran source files. Source files must have one of the following extensions: + - + .asm assembly language file .ASM assembly language file .c C file @@ -296,8 +364,9 @@ Source files must have one of the following extensions: POSIX: assembly language file + C pre-processor .spp assembly language file + C pre-processor .SPP assembly language file + C pre-processor - + + The target object file prefix (specified by the &cv-link-OBJPREFIX; construction variable; nothing by default) and suffix @@ -306,32 +375,38 @@ and suffix .o on POSIX systems) are automatically added to the target if not already present. Examples: + - + env.StaticObject(target = 'aaa', source = 'aaa.c') env.StaticObject(target = 'bbb.o', source = 'bbb.c++') env.StaticObject(target = 'ccc.obj', source = 'ccc.f') - + + Note that the source files will be scanned according to the suffix mappings in SourceFileScanner object. See the section "Scanner Objects," below, for more information. + + The version number of the C compiler. This may or may not be set, depending on the specific C compiler being used. + + The suffix for C source files. This is used by the internal CFile builder when generating C files from Lex (.l) or YACC (.y) input files. @@ -343,19 +418,23 @@ SCons also treats .C (upper case) files as C files. + + The version number of the C++ compiler. This may or may not be set, depending on the specific C++ compiler being used. + + The suffix for C++ source files. This is used by the internal CXXFile builder when generating C++ files from Lex (.ll) or YACC (.yy) input files. @@ -376,34 +455,45 @@ SCons also treats .C (upper case) files as C++ files. + + TODO + + TODO + + TODO + + When this construction variable is defined, a versioned shared library is created. This modifies the &cv-link-SHLINKFLAGS; as required, adds the version number to the library name, and creates the symlinks that are needed. &cv-link-SHLIBVERSION; needs to be of the form X.Y.Z, where X and Y are numbers, and Z is a number but can also contain letters to designate alpha, beta, or release candidate patch levels. + + + -- cgit v1.2.3