This appendix contains descriptions of all of the construction variables that are potentially available "out of the box" in this version of SCons. Whether or not setting a construction variable in a construction environment will actually have an effect depends on whether any of the Tools and/or Builders that use the variable have been included in the construction environment.
In this appendix, we have
appended the initial $
(dollar sign) to the beginning of each
variable name when it appears in the text,
but left off the dollar sign
in the left-hand column
where the name appears for each entry.
ARThe static library archiver.
ARCHITECTURESpecifies the system architecture for which the package is being built. The default is the system architecture of the machine on which SCons is running. This is used to fill in the Architecture: field in an Ipkg control file, and as part of the name of a generated RPM file.
ARCOMThe command line used to generate a static library from object files.
ARCOMSTR
The string displayed when an object file
is generated from an assembly-language source file.
If this is not set, then $ARCOM (the command line) is displayed.
env = Environment(ARCOMSTR = "Archiving $TARGET")
ARFLAGSGeneral options passed to the static library archiver.
ASThe assembler.
ASCOMThe command line used to generate an object file from an assembly-language source file.
ASCOMSTR
The string displayed when an object file
is generated from an assembly-language source file.
If this is not set, then $ASCOM (the command line) is displayed.
env = Environment(ASCOMSTR = "Assembling $TARGET")
ASFLAGSGeneral options passed to the assembler.
ASPPCOM
The command line used to assemble an assembly-language
source file into an object file
after first running the file through the C preprocessor.
Any options specified
in the $ASFLAGS and $CPPFLAGS construction variables
are included on this command line.
ASPPCOMSTR
The string displayed when an object file
is generated from an assembly-language source file
after first running the file through the C preprocessor.
If this is not set, then $ASPPCOM (the command line) is displayed.
env = Environment(ASPPCOMSTR = "Assembling $TARGET")
ASPPFLAGS
General options when an assembling an assembly-language
source file into an object file
after first running the file through the C preprocessor.
The default is to use the value of $ASFLAGS.
BIBTEXThe bibliography generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter.
BIBTEXCOMThe command line used to call the bibliography generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter.
BIBTEXCOMSTR
The string displayed when generating a bibliography
for TeX or LaTeX.
If this is not set, then $BIBTEXCOM (the command line) is displayed.
env = Environment(BIBTEXCOMSTR = "Generating bibliography $TARGET")
BIBTEXFLAGSGeneral options passed to the bibliography generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter.
BITKEEPERThe BitKeeper executable.
BITKEEPERCOMThe command line for fetching source files using BitKeeper.
BITKEEPERCOMSTR
The string displayed when fetching
a source file using BitKeeper.
If this is not set, then $BITKEEPERCOM
(the command line) is displayed.
BITKEEPERGET
The command ($BITKEEPER) and subcommand
for fetching source files using BitKeeper.
BITKEEPERGETFLAGSOptions that are passed to the BitKeeper get subcommand.
BUILDERSA dictionary mapping the names of the builders available through this environment to underlying Builder objects. Builders named Alias, CFile, CXXFile, DVI, Library, Object, PDF, PostScript, and Program are available by default. If you initialize this variable when an Environment is created:
env = Environment(BUILDERS = {'NewBuilder' : foo})
the default Builders will no longer be available. To use a new Builder object in addition to the default Builders, add your new Builder object like this:
env = Environment()
env.Append(BUILDERS = {'NewBuilder' : foo})
or this:
env = Environment() env['BUILDERS]['NewBuilder'] = foo
CCThe C compiler.
CCCOM
The command line used to compile a C source file to a (static) object
file. Any options specified in the $CFLAGS, $CCFLAGS and
$CPPFLAGS construction variables are included on this command
line.
CCCOMSTR
The string displayed when a C source file
is compiled to a (static) object file.
If this is not set, then $CCCOM (the command line) is displayed.
env = Environment(CCCOMSTR = "Compiling static object $TARGET")
CCFLAGSGeneral options that are passed to the C and C++ compilers.
CCPCHFLAGS
Options added to the compiler command line
to support building with precompiled headers.
The default value expands expands to the appropriate
Microsoft Visual C++ command-line options
when the $PCH construction variable is set.
CCPDBFLAGS
Options added to the compiler command line
to support storing debugging information in a
Microsoft Visual C++ PDB file.
The default value expands expands to appropriate
Microsoft Visual C++ command-line options
when the $PDB construction variable is set.
The Visual C++ compiler option that SCons uses by default
to generate PDB information is /Z7.
This works correctly with parallel (-j) builds
because it embeds the debug information in the intermediate object files,
as opposed to sharing a single PDB file between multiple object files.
This is also the only way to get debug information
embedded into a static library.
Using the /Zi instead may yield improved
link-time performance,
although parallel builds will no longer work.
You can generate PDB files with the /Zi
switch by overriding the default $CCPDBFLAGS variable as follows:
import SCons.Util
env['CCPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Zi /Fd%s" % File(PDB)) or ""}'])
An alternative would be to use the /Zi
to put the debugging information in a separate .pdb
file for each object file by overriding
the $CCPDBFLAGS variable as follows:
env['CCPDBFLAGS'] = '/Zi /Fd${TARGET}.pdb'
CCVERSIONThe version number of the C compiler. This may or may not be set, depending on the specific C compiler being used.
CFILESUFFIXThe 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. The default suffix, of course, is .c (lower case). On case-insensitive systems (like Windows), SCons also treats .C (upper case) files as C files.
CFLAGSGeneral options that are passed to the C compiler (C only; not C++).
CHANGE_SPECFILEA hook for modifying the file that controls the packaging build (the .spec for RPM, the control for Ipkg, the .wxs for MSI). If set, the function will be called after the SCons template for the file has been written. XXX
CHANGELOGThe name of a file containing the change log text to be included in the package. This is included as the %changelog section of the RPM .spec file.
_concat
A function used to produce variables like $_CPPINCFLAGS. It takes
four or five
arguments: a prefix to concatenate onto each element, a list of
elements, a suffix to concatenate onto each element, an environment
for variable interpolation, and an optional function that will be
called to transform the list before concatenation.
env['_CPPINCFLAGS'] = '$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs)} $)',
CONFIGUREDIRThe name of the directory in which Configure context test files are written. The default is .sconf_temp in the top-level directory containing the SConstruct file.
CONFIGURELOGThe name of the Configure context log file. The default is config.log in the top-level directory containing the SConstruct file.
_CPPDEFFLAGS
An automatically-generated construction variable
containing the C preprocessor command-line options
to define values.
The value of $_CPPDEFFLAGS is created
by appending $CPPDEFPREFIX and $CPPDEFSUFFIX
to the beginning and end
of each directory in $CPPDEFINES.
CPPDEFINES
A platform independent specification of C preprocessor definitions.
The definitions will be added to command lines
through the automatically-generated
$_CPPDEFFLAGS construction variable (see above),
which is constructed according to
the type of value of $CPPDEFINES:
If $CPPDEFINES is a string,
the values of the
$CPPDEFPREFIX and $CPPDEFSUFFIX
construction variables
will be added to the beginning and end.
# Will add -Dxyz to POSIX compiler command lines, # and /Dxyz to Microsoft Visual C++ command lines. env = Environment(CPPDEFINES='xyz')
If $CPPDEFINES is a list,
the values of the
$CPPDEFPREFIX and $CPPDEFSUFFIX
construction variables
will be appended to the beginning and end
of each element in the list.
If any element is a list or tuple,
then the first item is the name being
defined and the second item is its value:
# Will add -DB=2 -DA to POSIX compiler command lines,
# and /DB=2 /DA to Microsoft Visual C++ command lines.
env = Environment(CPPDEFINES=[('B', 2), 'A'])
If $CPPDEFINES is a dictionary,
the values of the
$CPPDEFPREFIX and $CPPDEFSUFFIX
construction variables
will be appended to the beginning and end
of each item from the dictionary.
The key of each dictionary item
is a name being defined
to the dictionary item's corresponding value;
if the value is
None,
then the name is defined without an explicit value.
Note that the resulting flags are sorted by keyword
to ensure that the order of the options on the
command line is consistent each time
scons
is run.
# Will add -DA -DB=2 to POSIX compiler command lines,
# and /DA /DB=2 to Microsoft Visual C++ command lines.
env = Environment(CPPDEFINES={'B':2, 'A':None})
CPPDEFPREFIX
The prefix used to specify preprocessor definitions
on the C compiler command line.
This will be appended to the beginning of each definition
in the $CPPDEFINES construction variable
when the $_CPPDEFFLAGS variable is automatically generated.
CPPDEFSUFFIX
The suffix used to specify preprocessor definitions
on the C compiler command line.
This will be appended to the end of each definition
in the $CPPDEFINES construction variable
when the $_CPPDEFFLAGS variable is automatically generated.
CPPFLAGS
User-specified C preprocessor options.
These will be included in any command that uses the C preprocessor,
including not just compilation of C and C++ source files
via the $CCCOM,
$SHCCCOM,
$CXXCOM and
$SHCXXCOM command lines,
but also the $FORTRANPPCOM,
$SHFORTRANPPCOM,
$F77PPCOM and
$SHF77PPCOM command lines
used to compile a Fortran source file,
and the $ASPPCOM command line
used to assemble an assembly language source file,
after first running each file through the C preprocessor.
Note that this variable does
not
contain
-I
(or similar) include search path options
that scons generates automatically from $CPPPATH.
See $_CPPINCFLAGS, below,
for the variable that expands to those options.
_CPPINCFLAGS
An automatically-generated construction variable
containing the C preprocessor command-line options
for specifying directories to be searched for include files.
The value of $_CPPINCFLAGS is created
by appending $INCPREFIX and $INCSUFFIX
to the beginning and end
of each directory in $CPPPATH.
CPPPATHThe list of directories that the C preprocessor will search for include directories. The C/C++ implicit dependency scanner will search these directories for include files. Don't explicitly put include directory arguments in CCFLAGS or CXXFLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: directory names in CPPPATH will be looked-up relative to the SConscript directory when they are used in a command. To force scons to look-up a directory relative to the root of the source tree use #:
env = Environment(CPPPATH='#/include')
The directory look-up can also be forced using the
Dir()
function:
include = Dir('include')
env = Environment(CPPPATH=include)
The directory list will be added to command lines
through the automatically-generated
$_CPPINCFLAGS
construction variable,
which is constructed by
appending the values of the
$INCPREFIX and $INCSUFFIX
construction variables
to the beginning and end
of each directory in $CPPPATH.
Any command lines you define that need
the CPPPATH directory list should
include $_CPPINCFLAGS:
env = Environment(CCCOM="my_compiler $_CPPINCFLAGS -c -o $TARGET $SOURCE")
CPPSUFFIXESThe list of suffixes of files that will be scanned for C preprocessor implicit dependencies (#include lines). The default list is:
[".c", ".C", ".cxx", ".cpp", ".c++", ".cc", ".h", ".H", ".hxx", ".hpp", ".hh", ".F", ".fpp", ".FPP", ".m", ".mm", ".S", ".spp", ".SPP"]
CVSThe CVS executable.
CVSCOFLAGSOptions that are passed to the CVS checkout subcommand.
CVSCOMThe command line used to fetch source files from a CVS repository.
CVSCOMSTR
The string displayed when fetching
a source file from a CVS repository.
If this is not set, then $CVSCOM
(the command line) is displayed.
CVSFLAGSGeneral options that are passed to CVS. By default, this is set to -d $CVSREPOSITORY to specify from where the files must be fetched.
CVSREPOSITORY
The path to the CVS repository.
This is referenced in the default
$CVSFLAGS value.
CXXThe C++ compiler.
CXXCOM
The command line used to compile a C++ source file to an object file.
Any options specified in the $CXXFLAGS and
$CPPFLAGS construction variables
are included on this command line.
CXXCOMSTR
The string displayed when a C++ source file
is compiled to a (static) object file.
If this is not set, then $CXXCOM (the command line) is displayed.
env = Environment(CXXCOMSTR = "Compiling static object $TARGET")
CXXFILESUFFIXThe 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. The default suffix is .cc. SCons also treats files with the suffixes .cpp, .cxx, .c++, and .C++ as C++ files, and files with .mm suffixes as Objective C++ files. On case-sensitive systems (Linux, UNIX, and other POSIX-alikes), SCons also treats .C (upper case) files as C++ files.
CXXFLAGS
General options that are passed to the C++ compiler.
By default, this includes the value of $CCFLAGS,
so that setting $CCFLAGS affects both C and C++ compilation.
If you want to add C++-specific flags,
you must set or override the value of $CXXFLAGS.
CXXVERSIONThe version number of the C++ compiler. This may or may not be set, depending on the specific C++ compiler being used.
DESCRIPTIONA long description of the project being packaged. This is included in the relevant section of the file that controls the packaging build.
DESCRIPTION_lang
A language-specific long description for
the specified lang.
This is used to populate a
%description -l
section of an RPM
.spec file.
DirA function that converts a string into a Dir instance relative to the target being built.
DirsA function that converts a list of strings into a list of Dir instances relative to the target being built.
DSUFFIXESThe list of suffixes of files that will be scanned for imported D package files. The default list is:
['.d']
DVIPDFThe TeX DVI file to PDF file converter.
DVIPDFCOMThe command line used to convert TeX DVI files into a PDF file.
DVIPDFCOMSTR
The string displayed when a TeX DVI file
is converted into a PDF file.
If this is not set, then $DVIPDFCOM (the command line) is displayed.
DVIPDFFLAGSGeneral options passed to the TeX DVI file to PDF file converter.
DVIPSThe TeX DVI file to PostScript converter.
DVIPSFLAGSGeneral options passed to the TeX DVI file to PostScript converter.
ENV
A dictionary of environment variables
to use when invoking commands. When
$ENV is used in a command all list
values will be joined using the path separator and any other non-string
values will simply be coerced to a string.
Note that, by default,
scons
does
not
propagate the environment in force when you
execute
scons
to the commands used to build target files.
This is so that builds will be guaranteed
repeatable regardless of the environment
variables set at the time
scons
is invoked.
If you want to propagate your environment variables to the commands executed to build target files, you must do so explicitly:
import os env = Environment(ENV = os.environ)
Note that you can choose only to propagate
certain environment variables.
A common example is
the system
PATH
environment variable,
so that
scons
uses the same utilities
as the invoking shell (or other process):
import os
env = Environment(ENV = {'PATH' : os.environ['PATH']})
ESCAPEA function that will be called to escape shell special characters in command lines. The function should take one argument: the command line string to escape; and should return the escaped command line.
F77
The Fortran 77 compiler.
You should normally set the $FORTRAN variable,
which specifies the default Fortran compiler
for all Fortran versions.
You only need to set $F77 if you need to use a specific compiler
or compiler version for Fortran 77 files.
F77COM
The command line used to compile a Fortran 77 source file to an object file.
You only need to set $F77COM if you need to use a specific
command line for Fortran 77 files.
You should normally set the $FORTRANCOM variable,
which specifies the default command line
for all Fortran versions.
F77COMSTR
The string displayed when a Fortran 77 source file
is compiled to an object file.
If this is not set, then $F77COM or $FORTRANCOM
(the command line) is displayed.
F77FLAGS
General user-specified options that are passed to the Fortran 77 compiler.
Note that this variable does
not
contain
-I
(or similar) include search path options
that scons generates automatically from $F77PATH.
See
$_F77INCFLAGS
below,
for the variable that expands to those options.
You only need to set $F77FLAGS if you need to define specific
user options for Fortran 77 files.
You should normally set the $FORTRANFLAGS variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
_F77INCFLAGS
An automatically-generated construction variable
containing the Fortran 77 compiler command-line options
for specifying directories to be searched for include files.
The value of $_F77INCFLAGS is created
by appending $INCPREFIX and $INCSUFFIX
to the beginning and end
of each directory in $F77PATH.
F77PATH
The list of directories that the Fortran 77 compiler will search for include
directories. The implicit dependency scanner will search these
directories for include files. Don't explicitly put include directory
arguments in $F77FLAGS because the result will be non-portable
and the directories will not be searched by the dependency scanner. Note:
directory names in $F77PATH will be looked-up relative to the SConscript
directory when they are used in a command. To force
scons
to look-up a directory relative to the root of the source tree use #:
You only need to set $F77PATH if you need to define a specific
include path for Fortran 77 files.
You should normally set the $FORTRANPATH variable,
which specifies the include path
for the default Fortran compiler
for all Fortran versions.
env = Environment(F77PATH='#/include')
The directory look-up can also be forced using the
Dir()
function:
include = Dir('include')
env = Environment(F77PATH=include)
The directory list will be added to command lines
through the automatically-generated
$_F77INCFLAGS
construction variable,
which is constructed by
appending the values of the
$INCPREFIX and $INCSUFFIX
construction variables
to the beginning and end
of each directory in $F77PATH.
Any command lines you define that need
the F77PATH directory list should
include $_F77INCFLAGS:
env = Environment(F77COM="my_compiler $_F77INCFLAGS -c -o $TARGET $SOURCE")
F77PPCOM
The command line used to compile a Fortran 77 source file to an object file
after first running the file through the C preprocessor.
Any options specified in the $F77FLAGS and $CPPFLAGS construction variables
are included on this command line.
You only need to set $F77PPCOM if you need to use a specific
C-preprocessor command line for Fortran 77 files.
You should normally set the $FORTRANPPCOM variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
F77PPCOMSTR
The string displayed when a Fortran 77 source file
is compiled to an object file
after first running the file through the C preprocessor.
If this is not set, then $F77PPCOM or $FORTRANPPCOM
(the command line) is displayed.
F90
The Fortran 90 compiler.
You should normally set the $FORTRAN variable,
which specifies the default Fortran compiler
for all Fortran versions.
You only need to set $F90 if you need to use a specific compiler
or compiler version for Fortran 90 files.
F90COM
The command line used to compile a Fortran 90 source file to an object file.
You only need to set $F90COM if you need to use a specific
command line for Fortran 90 files.
You should normally set the $FORTRANCOM variable,
which specifies the default command line
for all Fortran versions.
F90COMSTR
The string displayed when a Fortran 90 source file
is compiled to an object file.
If this is not set, then $F90COM or $FORTRANCOM
(the command line) is displayed.
F90FLAGS
General user-specified options that are passed to the Fortran 90 compiler.
Note that this variable does
not
contain
-I
(or similar) include search path options
that scons generates automatically from $F90PATH.
See
$_F90INCFLAGS
below,
for the variable that expands to those options.
You only need to set $F90FLAGS if you need to define specific
user options for Fortran 90 files.
You should normally set the $FORTRANFLAGS variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
_F90INCFLAGS
An automatically-generated construction variable
containing the Fortran 90 compiler command-line options
for specifying directories to be searched for include files.
The value of $_F90INCFLAGS is created
by appending $INCPREFIX and $INCSUFFIX
to the beginning and end
of each directory in $F90PATH.
F90PATH
The list of directories that the Fortran 90 compiler will search for include
directories. The implicit dependency scanner will search these
directories for include files. Don't explicitly put include directory
arguments in $F90FLAGS because the result will be non-portable
and the directories will not be searched by the dependency scanner. Note:
directory names in $F90PATH will be looked-up relative to the SConscript
directory when they are used in a command. To force
scons
to look-up a directory relative to the root of the source tree use #:
You only need to set $F90PATH if you need to define a specific
include path for Fortran 90 files.
You should normally set the $FORTRANPATH variable,
which specifies the include path
for the default Fortran compiler
for all Fortran versions.
env = Environment(F90PATH='#/include')
The directory look-up can also be forced using the
Dir()
function:
include = Dir('include')
env = Environment(F90PATH=include)
The directory list will be added to command lines
through the automatically-generated
$_F90INCFLAGS
construction variable,
which is constructed by
appending the values of the
$INCPREFIX and $INCSUFFIX
construction variables
to the beginning and end
of each directory in $F90PATH.
Any command lines you define that need
the F90PATH directory list should
include $_F90INCFLAGS:
env = Environment(F90COM="my_compiler $_F90INCFLAGS -c -o $TARGET $SOURCE")
F90PPCOM
The command line used to compile a Fortran 90 source file to an object file
after first running the file through the C preprocessor.
Any options specified in the $F90FLAGS and $CPPFLAGS construction variables
are included on this command line.
You only need to set $F90PPCOM if you need to use a specific
C-preprocessor command line for Fortran 90 files.
You should normally set the $FORTRANPPCOM variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
F90PPCOMSTR
The string displayed when a Fortran 90 source file
is compiled after first running the file through the C preprocessor.
If this is not set, then $F90PPCOM or $FORTRANPPCOM
(the command line) is displayed.
F95
The Fortran 95 compiler.
You should normally set the $FORTRAN variable,
which specifies the default Fortran compiler
for all Fortran versions.
You only need to set $F95 if you need to use a specific compiler
or compiler version for Fortran 95 files.
F95COM
The command line used to compile a Fortran 95 source file to an object file.
You only need to set $F95COM if you need to use a specific
command line for Fortran 95 files.
You should normally set the $FORTRANCOM variable,
which specifies the default command line
for all Fortran versions.
F95COMSTR
The string displayed when a Fortran 95 source file
is compiled to an object file.
If this is not set, then $F95COM or $FORTRANCOM
(the command line) is displayed.
F95FLAGS
General user-specified options that are passed to the Fortran 95 compiler.
Note that this variable does
not
contain
-I
(or similar) include search path options
that scons generates automatically from $F95PATH.
See
$_F95INCFLAGS
below,
for the variable that expands to those options.
You only need to set $F95FLAGS if you need to define specific
user options for Fortran 95 files.
You should normally set the $FORTRANFLAGS variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
_F95INCFLAGS
An automatically-generated construction variable
containing the Fortran 95 compiler command-line options
for specifying directories to be searched for include files.
The value of $_F95INCFLAGS is created
by appending $INCPREFIX and $INCSUFFIX
to the beginning and end
of each directory in $F95PATH.
F95PATH
The list of directories that the Fortran 95 compiler will search for include
directories. The implicit dependency scanner will search these
directories for include files. Don't explicitly put include directory
arguments in $F95FLAGS because the result will be non-portable
and the directories will not be searched by the dependency scanner. Note:
directory names in $F95PATH will be looked-up relative to the SConscript
directory when they are used in a command. To force
scons
to look-up a directory relative to the root of the source tree use #:
You only need to set $F95PATH if you need to define a specific
include path for Fortran 95 files.
You should normally set the $FORTRANPATH variable,
which specifies the include path
for the default Fortran compiler
for all Fortran versions.
env = Environment(F95PATH='#/include')
The directory look-up can also be forced using the
Dir()
function:
include = Dir('include')
env = Environment(F95PATH=include)
The directory list will be added to command lines
through the automatically-generated
$_F95INCFLAGS
construction variable,
which is constructed by
appending the values of the
$INCPREFIX and $INCSUFFIX
construction variables
to the beginning and end
of each directory in $F95PATH.
Any command lines you define that need
the F95PATH directory list should
include $_F95INCFLAGS:
env = Environment(F95COM="my_compiler $_F95INCFLAGS -c -o $TARGET $SOURCE")
F95PPCOM
The command line used to compile a Fortran 95 source file to an object file
after first running the file through the C preprocessor.
Any options specified in the $F95FLAGS and $CPPFLAGS construction variables
are included on this command line.
You only need to set $F95PPCOM if you need to use a specific
C-preprocessor command line for Fortran 95 files.
You should normally set the $FORTRANPPCOM variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
F95PPCOMSTR
The string displayed when a Fortran 95 source file
is compiled to an object file
after first running the file through the C preprocessor.
If this is not set, then $F95PPCOM or $FORTRANPPCOM
(the command line) is displayed.
FileA function that converts a string into a File instance relative to the target being built.
FORTRANThe default Fortran compiler for all versions of Fortran.
FORTRANCOM
The command line used to compile a Fortran source file to an object file.
By default, any options specified
in the $FORTRANFLAGS,
$CPPFLAGS,
$_CPPDEFFLAGS,
$_FORTRANMODFLAG, and
$_FORTRANINCFLAGS construction variables
are included on this command line.
FORTRANCOMSTR
The string displayed when a Fortran source file
is compiled to an object file.
If this is not set, then $FORTRANCOM
(the command line) is displayed.
FORTRANFLAGS
General user-specified options that are passed to the Fortran compiler.
Note that this variable does
not
contain
-I
(or similar) include or module search path options
that scons generates automatically from $FORTRANPATH.
See
$_FORTRANINCFLAGS and $_FORTRANMODFLAG,
below,
for the variables that expand those options.
_FORTRANINCFLAGS
An automatically-generated construction variable
containing the Fortran compiler command-line options
for specifying directories to be searched for include
files and module files.
The value of $_FORTRANINCFLAGS is created
by prepending/appending $INCPREFIX and $INCSUFFIX
to the beginning and end
of each directory in $FORTRANPATH.
FORTRANMODDIRDirectory location where the Fortran compiler should place any module files it generates. This variable is empty, by default. Some Fortran compilers will internally append this directory in the search path for module files, as well.
FORTRANMODDIRPREFIX
The prefix used to specify a module directory on the Fortran compiler command
line.
This will be appended to the beginning of the directory
in the $FORTRANMODDIR construction variables
when the $_FORTRANMODFLAG variables is automatically generated.
FORTRANMODDIRSUFFIX
The suffix used to specify a module directory on the Fortran compiler command
line.
This will be appended to the beginning of the directory
in the $FORTRANMODDIR construction variables
when the $_FORTRANMODFLAG variables is automatically generated.
_FORTRANMODFLAG
An automatically-generated construction variable
containing the Fortran compiler command-line option
for specifying the directory location where the Fortran
compiler should place any module files that happen to get
generated during compilation.
The value of $_FORTRANMODFLAG is created
by prepending/appending $FORTRANMODDIRPREFIX and
$FORTRANMODDIRSUFFIX
to the beginning and end of the directory in $FORTRANMODDIR.
FORTRANMODPREFIXThe module file prefix used by the Fortran compiler. SCons assumes that the Fortran compiler follows the quasi-standard naming convention for module files of module_name.mod. As a result, this variable is left empty, by default. For situations in which the compiler does not necessarily follow the normal convention, the user may use this variable. Its value will be appended to every module file name as scons attempts to resolve dependencies.
FORTRANMODSUFFIXThe module file suffix used by the Fortran compiler. SCons assumes that the Fortran compiler follows the quasi-standard naming convention for module files of module_name.mod. As a result, this variable is set to ".mod", by default. For situations in which the compiler does not necessarily follow the normal convention, the user may use this variable. Its value will be appended to every module file name as scons attempts to resolve dependencies.
FORTRANPATHThe list of directories that the Fortran compiler will search for include files and (for some compilers) module files. The Fortran implicit dependency scanner will search these directories for include files (but not module files since they are autogenerated and, as such, may not actually exist at the time the scan takes place). Don't explicitly put include directory arguments in FORTRANFLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: directory names in FORTRANPATH will be looked-up relative to the SConscript directory when they are used in a command. To force scons to look-up a directory relative to the root of the source tree use #:
env = Environment(FORTRANPATH='#/include')
The directory look-up can also be forced using the
Dir()
function:
include = Dir('include')
env = Environment(FORTRANPATH=include)
The directory list will be added to command lines
through the automatically-generated
$_FORTRANINCFLAGS
construction variable,
which is constructed by
appending the values of the
$INCPREFIX and $INCSUFFIX
construction variables
to the beginning and end
of each directory in $FORTRANPATH.
Any command lines you define that need
the FORTRANPATH directory list should
include $_FORTRANINCFLAGS:
env = Environment(FORTRANCOM="my_compiler $_FORTRANINCFLAGS -c -o $TARGET $SOURCE")
FORTRANPPCOM
The command line used to compile a Fortran source file to an object file
after first running the file through the C preprocessor.
By default, any options specified in the $FORTRANFLAGS,
$CPPFLAGS,
$_CPPDEFFLAGS,
$_FORTRANMODFLAG, and
$_FORTRANINCFLAGS
construction variables are included on this command line.
FORTRANPPCOMSTR
The string displayed when a Fortran source file
is compiled to an object file
after first running the file throught the C preprocessor.
If this is not set, then $FORTRANPPCOM
(the command line) is displayed.
FORTRANSUFFIXESThe list of suffixes of files that will be scanned for Fortran implicit dependencies (INCLUDE lines and USE statements). The default list is:
[".f", ".F", ".for", ".FOR", ".ftn", ".FTN", ".fpp", ".FPP", ".f77", ".F77", ".f90", ".F90", ".f95", ".F95"]
FRAMEWORKPATH
On Mac OS X with gcc,
a list containing the paths to search for frameworks.
Used by the compiler to find framework-style includes like
#include <Fmwk/Header.h>.
Used by the linker to find user-specified frameworks when linking (see
$FRAMEWORKS).
For example:
env.AppendUnique(FRAMEWORKPATH='#myframeworkdir')
will add
... -Fmyframeworkdir
to the compiler and linker command lines.
_FRAMEWORKPATH
On Mac OS X with gcc, an automatically-generated construction variable
containing the linker command-line options corresponding to
$FRAMEWORKPATH.
FRAMEWORKPATHPREFIX
On Mac OS X with gcc, the prefix to be used for the FRAMEWORKPATH entries.
(see $FRAMEWORKPATH).
The default value is
-F.
FRAMEWORKPREFIX
On Mac OS X with gcc,
the prefix to be used for linking in frameworks
(see $FRAMEWORKS).
The default value is
-framework.
_FRAMEWORKSOn Mac OS X with gcc, an automatically-generated construction variable containing the linker command-line options for linking with FRAMEWORKS.
FRAMEWORKSOn Mac OS X with gcc, a list of the framework names to be linked into a program or shared library or bundle. The default value is the empty list. For example:
env.AppendUnique(FRAMEWORKS=Split('System Cocoa SystemConfiguration'))
FRAMEWORKSFLAGS
On Mac OS X with gcc,
general user-supplied frameworks options to be added at
the end of a command
line building a loadable module.
(This has been largely superceded by
the $FRAMEWORKPATH, $FRAMEWORKPATHPREFIX,
$FRAMEWORKPREFIX and $FRAMEWORKS variables
described above.)
GSThe Ghostscript program used to convert PostScript to PDF files.
GSCOMThe Ghostscript command line used to convert PostScript to PDF files.
GSCOMSTR
The string displayed when
Ghostscript is used to convert
a PostScript file to a PDF file.
If this is not set, then $GSCOM (the command line) is displayed.
GSFLAGSGeneral options passed to the Ghostscript program when converting PostScript to PDF files.
IDLSUFFIXESThe list of suffixes of files that will be scanned for IDL implicit dependencies (#include or import lines). The default list is:
[".idl", ".IDL"]
IMPLICIT_COMMAND_DEPENDENCIESControls whether or not SCons will add implicit dependencies for the commands executed to build targets.
By default, SCons will add
to each target
an implicit dependency on the command
represented by the first argument on any
command line it executes.
The specific file for the dependency is
found by searching the
PATH
variable in the
ENV
environment used to execute the command.
If the construction variable
$IMPLICIT_COMMAND_DEPENDENCIES
is set to a false value
(None,
False,
0,
etc.),
then the implicit dependency will
not be added to the targets
built with that construction environment.
env = Environment(IMPLICIT_COMMAND_DEPENDENCIES = 0)
INCPREFIX
The prefix used to specify an include directory on the C compiler command
line.
This will be appended to the beginning of each directory
in the $CPPPATH and $FORTRANPATH construction variables
when the $_CPPINCFLAGS and $_FORTRANINCFLAGS
variables are automatically generated.
INCSUFFIX
The suffix used to specify an include directory on the C compiler command
line.
This will be appended to the end of each directory
in the $CPPPATH and $FORTRANPATH construction variables
when the $_CPPINCFLAGS and $_FORTRANINCFLAGS
variables are automatically generated.
INSTALLA function to be called to install a file into a destination file name. The default function copies the file into the destination (and sets the destination file's mode and permission bits to match the source file's). The function takes the following arguments:
def install(dest, source, env):
dest
is the path name of the destination file.
source
is the path name of the source file.
env
is the construction environment
(a dictionary of construction values)
in force for this file installation.
INSTALLSTRThe string displayed when a file is installed into a destination file name. The default is:
Install file: "$SOURCE" as "$TARGET"
INTEL_C_COMPILER_VERSIONSet by the "intelc" Tool to the major version number of the Intel C compiler selected for use.
JARThe Java archive tool.
JARCHDIR
The directory to which the Java archive tool should change
(using the
-C
option).
JARCOMThe command line used to call the Java archive tool.
JARCOMSTR
The string displayed when the Java archive tool
is called
If this is not set, then $JARCOM (the command line) is displayed.
env = Environment(JARCOMSTR = "JARchiving $SOURCES into $TARGET")
JARFLAGS
General options passed to the Java archive tool.
By default this is set to
cf
to create the necessary
jar
file.
JARSUFFIXThe suffix for Java archives: .jar by default.
JAVABOOTCLASSPATH
Specifies the list of directories that
will be added to the
javac command line
via the -bootclasspath option.
The individual directory names will be
separated by the operating system's path separate character
(: on UNIX/Linux/POSIX,
; on Windows).
JAVACThe Java compiler.
JAVACCOM
The command line used to compile a directory tree containing
Java source files to
corresponding Java class files.
Any options specified in the $JAVACFLAGS construction variable
are included on this command line.
JAVACCOMSTR
The string displayed when compiling
a directory tree of Java source files to
corresponding Java class files.
If this is not set, then $JAVACCOM (the command line) is displayed.
env = Environment(JAVACCOMSTR = "Compiling class files $TARGETS from $SOURCES")
JAVACFLAGSGeneral options that are passed to the Java compiler.
JAVACLASSDIRThe directory in which Java class files may be found. This is stripped from the beginning of any Java .class file names supplied to the JavaH builder.
JAVACLASSPATH
Specifies the list of directories that
will be searched for Java
.class file.
The directories in this list will be added to the
javac and javah command lines
via the -classpath option.
The individual directory names will be
separated by the operating system's path separate character
(: on UNIX/Linux/POSIX,
; on Windows).
Note that this currently just adds the specified
directory via the -classpath option.
SCons does not currently search the
$JAVACLASSPATH directories for dependency
.class files.
JAVACLASSSUFFIXThe suffix for Java class files; .class by default.
JAVAHThe Java generator for C header and stub files.
JAVAHCOM
The command line used to generate C header and stub files
from Java classes.
Any options specified in the $JAVAHFLAGS construction variable
are included on this command line.
JAVAHCOMSTR
The string displayed when C header and stub files
are generated from Java classes.
If this is not set, then $JAVAHCOM (the command line) is displayed.
env = Environment(JAVAHCOMSTR = "Generating header/stub file(s) $TARGETS from $SOURCES")
JAVAHFLAGSGeneral options passed to the C header and stub file generator for Java classes.
JAVASOURCEPATH
Specifies the list of directories that
will be searched for input
.java file.
The directories in this list will be added to the
javac command line
via the -sourcepath option.
The individual directory names will be
separated by the operating system's path separate character
(: on UNIX/Linux/POSIX,
; on Windows).
Note that this currently just adds the specified
directory via the -sourcepath option.
SCons does not currently search the
$JAVASOURCEPATH directories for dependency
.java files.
JAVASUFFIXThe suffix for Java files; .java by default.
JAVAVERSION
Specifies the Java version being used by the Java builder.
This is not currently used to select one
version of the Java compiler vs. another.
Instead, you should set this to specify the version of Java
supported by your javac compiler.
The default is 1.4.
This is sometimes necessary because
Java 1.5 changed the file names that are created
for nested anonymous inner classes,
which can cause a mismatch with the files
that SCons expects will be generated by the javac compiler.
Setting $JAVAVERSION to 1.5
(or 1.6, as appropriate)
can make SCons realize that a Java 1.5 or 1.6
build is actually up to date.
LATEXThe LaTeX structured formatter and typesetter.
LATEXCOMThe command line used to call the LaTeX structured formatter and typesetter.
LATEXCOMSTR
The string displayed when calling
the LaTeX structured formatter and typesetter.
If this is not set, then $LATEXCOM (the command line) is displayed.
env = Environment(LATEXCOMSTR = "Building $TARGET from LaTeX input $SOURCES")
LATEXFLAGSGeneral options passed to the LaTeX structured formatter and typesetter.
LATEXRETRIES
The maximum number of times that LaTeX
will be re-run if the
.log
generated by the $LATEXCOM command
indicates that there are undefined references.
The default is to try to resolve undefined references
by re-running LaTeX up to three times.
LATEXSUFFIXESThe list of suffixes of files that will be scanned for LaTeX implicit dependencies (\include or \import files). The default list is:
[".tex", ".ltx", ".latex"]
LDMODULE
The linker for building loadable modules.
By default, this is the same as $SHLINK.
LDMODULECOM
The command line for building loadable modules.
On Mac OS X, this uses the $LDMODULE,
$LDMODULEFLAGS and
$FRAMEWORKSFLAGS variables.
On other systems, this is the same as $SHLINK.
LDMODULECOMSTR
The string displayed when building loadable modules.
If this is not set, then $LDMODULECOM (the command line) is displayed.
LDMODULEFLAGSGeneral user options passed to the linker for building loadable modules.
LDMODULEPREFIX
The prefix used for loadable module file names.
On Mac OS X, this is null;
on other systems, this is
the same as $SHLIBPREFIX.
LDMODULESUFFIXThe suffix used for loadable module file names. On Mac OS X, this is null; on other systems, this is the same as $SHLIBSUFFIX.
LEXThe lexical analyzer generator.
LEXCOMThe command line used to call the lexical analyzer generator to generate a source file.
LEXCOMSTR
The string displayed when generating a source file
using the lexical analyzer generator.
If this is not set, then $LEXCOM (the command line) is displayed.
env = Environment(LEXCOMSTR = "Lex'ing $TARGET from $SOURCES")
LEXFLAGSGeneral options passed to the lexical analyzer generator.
_LIBDIRFLAGS
An automatically-generated construction variable
containing the linker command-line options
for specifying directories to be searched for library.
The value of $_LIBDIRFLAGS is created
by appending $LIBDIRPREFIX and $LIBDIRSUFFIX
to the beginning and end
of each directory in $LIBPATH.
LIBDIRPREFIX
The prefix used to specify a library directory on the linker command line.
This will be appended to the beginning of each directory
in the $LIBPATH construction variable
when the $_LIBDIRFLAGS variable is automatically generated.
LIBDIRSUFFIX
The suffix used to specify a library directory on the linker command line.
This will be appended to the end of each directory
in the $LIBPATH construction variable
when the $_LIBDIRFLAGS variable is automatically generated.
_LIBFLAGS
An automatically-generated construction variable
containing the linker command-line options
for specifying libraries to be linked with the resulting target.
The value of $_LIBFLAGS is created
by appending $LIBLINKPREFIX and $LIBLINKSUFFIX
to the beginning and end
of each filename in $LIBS.
LIBLINKPREFIX
The prefix used to specify a library to link on the linker command line.
This will be appended to the beginning of each library
in the $LIBS construction variable
when the $_LIBFLAGS variable is automatically generated.
LIBLINKSUFFIX
The suffix used to specify a library to link on the linker command line.
This will be appended to the end of each library
in the $LIBS construction variable
when the $_LIBFLAGS variable is automatically generated.
LIBPATH
The list of directories that will be searched for libraries.
The implicit dependency scanner will search these
directories for include files. Don't explicitly put include directory
arguments in $LINKFLAGS or $SHLINKFLAGS
because the result will be non-portable
and the directories will not be searched by the dependency scanner. Note:
directory names in LIBPATH will be looked-up relative to the SConscript
directory when they are used in a command. To force
scons
to look-up a directory relative to the root of the source tree use #:
env = Environment(LIBPATH='#/libs')
The directory look-up can also be forced using the
Dir()
function:
libs = Dir('libs')
env = Environment(LIBPATH=libs)
The directory list will be added to command lines
through the automatically-generated
$_LIBDIRFLAGS
construction variable,
which is constructed by
appending the values of the
$LIBDIRPREFIX and $LIBDIRSUFFIX
construction variables
to the beginning and end
of each directory in $LIBPATH.
Any command lines you define that need
the LIBPATH directory list should
include $_LIBDIRFLAGS:
env = Environment(LINKCOM="my_linker $_LIBDIRFLAGS $_LIBFLAGS -o $TARGET $SOURCE")
LIBPREFIXThe prefix used for (static) library file names. A default value is set for each platform (posix, win32, os2, etc.), but the value is overridden by individual tools (ar, mslib, sgiar, sunar, tlib, etc.) to reflect the names of the libraries they create.
LIBPREFIXES
A list of all legal prefixes for library file names.
When searching for library dependencies,
SCons will look for files with these prefixes,
the base library name,
and suffixes in the $LIBSUFFIXES list.
LIBSA list of one or more libraries that will be linked with any executable programs created by this environment.
The library list will be added to command lines
through the automatically-generated
$_LIBFLAGS
construction variable,
which is constructed by
appending the values of the
$LIBLINKPREFIX and $LIBLINKSUFFIX
construction variables
to the beginning and end
of each filename in $LIBS.
Any command lines you define that need
the LIBS library list should
include $_LIBFLAGS:
env = Environment(LINKCOM="my_linker $_LIBDIRFLAGS $_LIBFLAGS -o $TARGET $SOURCE")
If you add a
File
object to the
$LIBS
list, the name of that file will be added to
$_LIBFLAGS,
and thus the link line, as is, without
$LIBLINKPREFIX
or
$LIBLINKSUFFIX.
For example:
env.Append(LIBS=File('/tmp/mylib.so'))
In all cases, scons will add dependencies from the executable program to all the libraries in this list.
LIBSUFFIXThe suffix used for (static) library file names. A default value is set for each platform (posix, win32, os2, etc.), but the value is overridden by individual tools (ar, mslib, sgiar, sunar, tlib, etc.) to reflect the names of the libraries they create.
LIBSUFFIXES
A list of all legal suffixes for library file names.
When searching for library dependencies,
SCons will look for files with prefixes, in the $LIBPREFIXES list,
the base library name,
and these suffixes.
LICENSEThe abbreviated name of the license under which this project is released (gpl, lpgl, bsd etc.). See http://www.opensource.org/licenses/alphabetical for a list of license names.
LINKThe linker.
LINKCOMThe command line used to link object files into an executable.
LINKCOMSTR
The string displayed when object files
are linked into an executable.
If this is not set, then $LINKCOM (the command line) is displayed.
env = Environment(LINKCOMSTR = "Linking $TARGET")
LINKFLAGS
General user options passed to the linker.
Note that this variable should
not
contain
-l
(or similar) options for linking with the libraries listed in $LIBS,
nor
-L
(or similar) library search path options
that scons generates automatically from $LIBPATH.
See
$_LIBFLAGS
above,
for the variable that expands to library-link options,
and
$_LIBDIRFLAGS
above,
for the variable that expands to library search path options.
M4The M4 macro preprocessor.
M4COMThe command line used to pass files through the M4 macro preprocessor.
M4COMSTR
The string displayed when
a file is passed through the M4 macro preprocessor.
If this is not set, then $M4COM (the command line) is displayed.
M4FLAGSGeneral options passed to the M4 macro preprocessor.
MAKEINDEXThe makeindex generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter.
MAKEINDEXCOMThe command line used to call the makeindex generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter.
MAKEINDEXCOMSTR
The string displayed when calling the makeindex generator for the
TeX formatter and typesetter
and the LaTeX structured formatter and typesetter.
If this is not set, then $MAKEINDEXCOM (the command line) is displayed.
MAKEINDEXFLAGSGeneral options passed to the makeindex generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter.
MAXLINELENGTHThe maximum number of characters allowed on an external command line. On Win32 systems, link lines longer than this many characters are linked via a temporary file name.
MIDLThe Microsoft IDL compiler.
MIDLCOMThe command line used to pass files to the Microsoft IDL compiler.
MIDLCOMSTR
The string displayed when
the Microsoft IDL copmiler is called.
If this is not set, then $MIDLCOM (the command line) is displayed.
MIDLFLAGSGeneral options passed to the Microsoft IDL compiler.
MSVSWhen the Microsoft Visual Studio tools are initialized, they set up this dictionary with the following keys:
VERSION:
the version of MSVS being used (can be set via
MSVS_VERSION)
VERSIONS:
the available versions of MSVS installed
VCINSTALLDIR:
installed directory of Visual C++
VSINSTALLDIR:
installed directory of Visual Studio
FRAMEWORKDIR:
installed directory of the .NET framework
FRAMEWORKVERSIONS:
list of installed versions of the .NET framework, sorted latest to oldest.
FRAMEWORKVERSION:
latest installed version of the .NET framework
FRAMEWORKSDKDIR:
installed location of the .NET SDK.
PLATFORMSDKDIR:
installed location of the Platform SDK.
PLATFORMSDK_MODULES:
dictionary of installed Platform SDK modules,
where the dictionary keys are keywords for the various modules, and
the values are 2-tuples where the first is the release date, and the
second is the version number.
If a value isn't set, it wasn't available in the registry.
MSVS_IGNORE_IDE_PATHSTells the MS Visual Studio tools to use minimal INCLUDE, LIB, and PATH settings, instead of the settings from the IDE.
For Visual Studio, SCons will (by default) automatically determine
where MSVS is installed, and use the LIB, INCLUDE, and PATH variables
set by the IDE. You can override this behavior by setting these
variables after Environment initialization, or by setting
MSVS_IGNORE_IDE_PATHS = 1
in the Environment initialization.
Specifying this will not leave these unset, but will set them to a
minimal set of paths needed to run the tools successfully.
For VS6, the mininimal set is:
INCLUDE:'<VSDir>\VC98\ATL\include;<VSDir>\VC98\MFC\include;<VSDir>\VC98\include' LIB:'<VSDir>\VC98\MFC\lib;<VSDir>\VC98\lib' PATH:'<VSDir>\Common\MSDev98\bin;<VSDir>\VC98\bin'
For VS7, it is:
INCLUDE:'<VSDir>\Vc7\atlmfc\include;<VSDir>\Vc7\include' LIB:'<VSDir>\Vc7\atlmfc\lib;<VSDir>\Vc7\lib' PATH:'<VSDir>\Common7\Tools\bin;<VSDir>\Common7\Tools;<VSDir>\Vc7\bin'
Where '<VSDir>' is the installed location of Visual Studio.
MSVS_PROJECT_BASE_PATHThe string placed in a generated Microsoft Visual Studio solution file as the value of the SccProjectFilePathRelativizedFromConnection0 and SccProjectFilePathRelativizedFromConnection1 attributes of the GlobalSection(SourceCodeControl) section. There is no default value.
MSVS_PROJECT_GUIDThe string placed in a generated Microsoft Visual Studio project file as the value of the ProjectGUID attribute. The string is also placed in the SolutionUniqueID attribute of the GlobalSection(SourceCodeControl) section of the Microsoft Visual Studio solution file. There is no default value.
MSVS_SCC_AUX_PATH
The path name
placed in a generated Microsoft Visual Studio project file
as the value of the
SccAuxPath
attribute
if the
MSVS_SCC_PROVIDER
construction variable is also set.
There is no default value.
MSVS_SCC_LOCAL_PATH
The path name
placed in a generated Microsoft Visual Studio project file
as the value of the
SccLocalPath
attribute
if the
MSVS_SCC_PROVIDER
construction variable is also set.
The path name is also placed in the
SccLocalPath0
and
SccLocalPath1
attributes of the
GlobalSection(SourceCodeControl)
section of the Microsoft Visual Studio solution file.
There is no default value.
MSVS_SCC_PROJECT_NAMEThe project name placed in a generated Microsoft Visual Studio project file as the value of the SccProjectName attribute. There is no default value.
MSVS_SCC_PROVIDERThe string placed in a generated Microsoft Visual Studio project file as the value of the SccProvider attribute. The string is also placed in the SccProvider1 attribute of the GlobalSection(SourceCodeControl) section of the Microsoft Visual Studio solution file. There is no default value.
MSVS_USE_MFC_DIRS
Tells the MS Visual Studio tool(s) to use
the MFC directories in its default paths
for compiling and linking.
The $MSVS_USE_MFC_DIRS variable has no effect if the
INCLUDE
or
LIB
environment variables are set explictly.
Under Visual Studio version 6,
setting
$MSVS_USE_MFC_DIRS
to a non-zero value
adds the
ATL\include
and
MFC\include
directories to
the default
INCLUDE
external environment variable,
and adds the
MFC\lib
directory to
the default
LIB
external environment variable.
Under Visual Studio version 7,
setting
$MSVS_USE_MFC_DIRS
to a non-zero value
adds the
atlmfc\include
directory to the default
INCLUDE
external environment variable,
and adds the
atlmfc\lib
directory to the default
LIB
external environment variable.
Under Visual Studio version 8,
setting
$MSVS_USE_MFC_DIRS
to a non-zero value will,
by default,
add the
atlmfc\include
directory to the default
INCLUDE
external environment variable,
and the
atlmfc\lib
directory to the default
LIB
external environment variable.
If, however, the
['MSVS']['PLATFORMSDKDIR']
variable is set,
then the
mfc
and the
atl
subdirectories of the
PLATFORMSDKDIR
are added to the default value of the
INCLUDE
external environment variable,
and the default value of the
LIB
external environment variable is left untouched.
MSVS_VERSIONSets the preferred version of MSVS to use.
SCons will (by default) select the latest version of MSVS
installed on your machine.
So, if you have version 6 and version 7 (MSVS .NET) installed,
it will prefer version 7.
You can override this by
specifying the
MSVS_VERSION
variable in the Environment initialization, setting it to the
appropriate version ('6.0' or '7.0', for example).
If the given version isn't installed, tool initialization will fail.
MSVSBUILDCOMThe build command line placed in a generated Microsoft Visual Studio project file. The default is to have Visual Studio invoke SCons with any specified build targets.
MSVSCLEANCOMThe clean command line placed in a generated Microsoft Visual Studio project file. The default is to have Visual Studio invoke SCons with the -c option to remove any specified targets.
MSVSENCODINGThe encoding string placed in a generated Microsoft Visual Studio project file. The default is encoding Windows-1252.
MSVSPROJECTCOMThe action used to generate Microsoft Visual Studio project files.
MSVSPROJECTSUFFIXThe suffix used for Microsoft Visual Studio project (DSP) files. The default value is .vcproj when using Visual Studio version 7.x (.NET) or later version, and .dsp when using earlier versions of Visual Studio.
MSVSREBUILDCOMThe rebuild command line placed in a generated Microsoft Visual Studio project file. The default is to have Visual Studio invoke SCons with any specified rebuild targets.
MSVSSCONSThe SCons used in generated Microsoft Visual Studio project files. The default is the version of SCons being used to generate the project file.
MSVSSCONSCOMThe default SCons command used in generated Microsoft Visual Studio project files.
MSVSSCONSCRIPT
The sconscript file
(that is,
SConstruct
or
SConscript
file)
that will be invoked by Visual Studio
project files
(through the
$MSVSSCONSCOM
variable).
The default is the same sconscript file
that contains the call to
MSVSProject
to build the project file.
MSVSSCONSFLAGSThe SCons flags used in generated Microsoft Visual Studio project files.
MSVSSOLUTIONCOMThe action used to generate Microsoft Visual Studio solution files.
MSVSSOLUTIONSUFFIXThe suffix used for Microsoft Visual Studio solution (DSW) files. The default value is .sln when using Visual Studio version 7.x (.NET), and .dsw when using earlier versions of Visual Studio.
MWCW_VERSIONThe version number of the MetroWerks CodeWarrior C compiler to be used.
MWCW_VERSIONSA list of installed versions of the MetroWerks CodeWarrior C compiler on this system.
NAMESpecfies the name of the project to package.
no_import_libWhen set to non-zero, suppresses creation of a corresponding Windows static import lib by the SharedLibrary builder when used with MinGW, Microsoft Visual Studio or Metrowerks. This also suppresses creation of an export (.exp) file when using Microsoft Visual Studio.
OBJPREFIXThe prefix used for (static) object file names.
OBJSUFFIXThe suffix used for (static) object file names.
P4The Perforce executable.
P4COMThe command line used to fetch source files from Perforce.
P4COMSTR
The string displayed when
fetching a source file from Perforce.
If this is not set, then $P4COM (the command line) is displayed.
P4FLAGSGeneral options that are passed to Perforce.
PACKAGEROOTSpecifies the directory where all files in resulting archive will be placed if applicable. The default value is "$NAME-$VERSION".
PACKAGETYPESelects the package type to build. Currently these are available:
* msi - Microsoft Installer * rpm - Redhat Package Manger * ipkg - Itsy Package Management System * tarbz2 - compressed tar * targz - compressed tar * zip - zip file * src_tarbz2 - compressed tar source * src_targz - compressed tar source * src_zip - zip file source
This may be overridden with the "package_type" command line option.
PACKAGEVERSIONThe version of the package (not the underlying project). This is currently only used by the rpm packager and should reflect changes in the packaging, not the underlying project code itself.
PCHThe Microsoft Visual C++ precompiled header that will be used when compiling object files. This variable is ignored by tools other than Microsoft Visual C++. When this variable is defined SCons will add options to the compiler command line to cause it to use the precompiled header, and will also set up the dependencies for the PCH file. Example:
env['PCH'] = 'StdAfx.pch'
PCHCOM
The command line used by the
PCH
builder to generated a precompiled header.
PCHCOMSTR
The string displayed when generating a precompiled header.
If this is not set, then $PCHCOM (the command line) is displayed.
PCHPDBFLAGS
A construction variable that, when expanded,
adds the /yD flag to the command line
only if the $PDB construction variable is set.
PCHSTOPThis variable specifies how much of a source file is precompiled. This variable is ignored by tools other than Microsoft Visual C++, or when the PCH variable is not being used. When this variable is define it must be a string that is the name of the header that is included at the end of the precompiled portion of the source files, or the empty string if the "#pragma hrdstop" construct is being used:
env['PCHSTOP'] = 'StdAfx.h'
PDBThe Microsoft Visual C++ PDB file that will store debugging information for object files, shared libraries, and programs. This variable is ignored by tools other than Microsoft Visual C++. When this variable is defined SCons will add options to the compiler and linker command line to cause them to generate external debugging information, and will also set up the dependencies for the PDB file. Example:
env['PDB'] = 'hello.pdb'
The Visual C++ compiler switch that SCons uses by default
to generate PDB information is /Z7.
This works correctly with parallel (-j) builds
because it embeds the debug information in the intermediate object files,
as opposed to sharing a single PDB file between multiple object files.
This is also the only way to get debug information
embedded into a static library.
Using the /Zi instead may yield improved
link-time performance,
although parallel builds will no longer work.
You can generate PDB files with the /Zi
switch by overriding the default $CCPDBFLAGS variable;
see the entry for that variable for specific examples.
PDFCOM
A deprecated synonym for $DVIPDFCOM.
PDFLATEXThe pdflatex utility.
PDFLATEXCOMThe command line used to call the pdflatex utility.
PDFLATEXCOMSTR
The string displayed when calling the pdflatex utility.
If this is not set, then $PDFLATEXCOM (the command line) is displayed.
env = Environment(PDFLATEX;COMSTR = "Building $TARGET from LaTeX input $SOURCES")
PDFLATEXFLAGSGeneral options passed to the pdflatex utility.
PDFPREFIXThe prefix used for PDF file names.
PDFSUFFIXThe suffix used for PDF file names.
PDFTEXThe pdftex utility.
PDFTEXCOMThe command line used to call the pdftex utility.
PDFTEXCOMSTR
The string displayed when calling the pdftex utility.
If this is not set, then $PDFTEXCOM (the command line) is displayed.
env = Environment(PDFTEXCOMSTR = "Building $TARGET from TeX input $SOURCES")
PDFTEXFLAGSGeneral options passed to the pdftex utility.
PKGCHK
On Solaris systems,
the package-checking program that will
be used (along with $PKGINFO)
to look for installed versions of
the Sun PRO C++ compiler.
The default is
/usr/sbin/pgkchk.
PKGINFO
On Solaris systems,
the package information program that will
be used (along with $PKGCHK)
to look for installed versions of
the Sun PRO C++ compiler.
The default is
pkginfo.
PLATFORMThe name of the platform used to create the Environment. If no platform is specified when the Environment is created, scons autodetects the platform.
env = Environment(tools = [])
if env['PLATFORM'] == 'cygwin':
Tool('mingw')(env)
else:
Tool('msvc')(env)
PRINT_CMD_LINE_FUNC
A Python function used to print the command lines as they are executed
(assuming command printing is not disabled by the
-q
or
-s
options or their equivalents).
The function should take four arguments:
s,
the command being executed (a string),
target,
the target being built (file node, list, or string name(s)),
source,
the source(s) used (file node, list, or string name(s)), and
env,
the environment being used.
The function must do the printing itself. The default implementation, used if this variable is not set or is None, is:
def print_cmd_line(s, target, source, env): sys.stdout.write(s + "\n")
Here's an example of a more interesting function:
def print_cmd_line(s, target, source, env):
sys.stdout.write("Building %s -> %s...\n" %
(' and '.join([str(x) for x in source]),
' and '.join([str(x) for x in target])))
env=Environment(PRINT_CMD_LINE_FUNC=print_cmd_line)
env.Program('foo', 'foo.c')
This just prints "Building targetname from sourcename..." instead
of the actual commands.
Such a function could also log the actual commands to a log file,
for example.
PROGPREFIXThe prefix used for executable file names.
PROGSUFFIXThe suffix used for executable file names.
PSCOMThe command line used to convert TeX DVI files into a PostScript file.
PSCOMSTR
The string displayed when a TeX DVI file
is converted into a PostScript file.
If this is not set, then $PSCOM (the command line) is displayed.
PSPREFIXThe prefix used for PostScript file names.
PSSUFFIXThe prefix used for PostScript file names.
QT_AUTOSCANTurn off scanning for mocable files. Use the Moc Builder to explicitely specify files to run moc on.
QT_BINPATH
The path where the qt binaries are installed.
The default value is '$QTDIR/bin'.
QT_CPPPATH
The path where the qt header files are installed.
The default value is '$QTDIR/include'.
Note: If you set this variable to None,
the tool won't change the $CPPPATH
construction variable.
QT_DEBUGPrints lots of debugging information while scanning for moc files.
QT_LIB
Default value is 'qt'. You may want to set this to 'qt-mt'. Note: If you set
this variable to None, the tool won't change the $LIBS variable.
QT_LIBPATH
The path where the qt libraries are installed.
The default value is '$QTDIR/lib'.
Note: If you set this variable to None,
the tool won't change the $LIBPATH
construction variable.
QT_MOC
Default value is '$QT_BINPATH/moc'.
QT_MOCCXXPREFIXDefault value is ''. Prefix for moc output files, when source is a cxx file.
QT_MOCCXXSUFFIXDefault value is '.moc'. Suffix for moc output files, when source is a cxx file.
QT_MOCFROMCXXCOMCommand to generate a moc file from a cpp file.
QT_MOCFROMCXXCOMSTR
The string displayed when generating a moc file from a cpp file.
If this is not set, then $QT_MOCFROMCXXCOM (the command line) is displayed.
QT_MOCFROMCXXFLAGSDefault value is '-i'. These flags are passed to moc, when moccing a C++ file.
QT_MOCFROMHCOMCommand to generate a moc file from a header.
QT_MOCFROMHCOMSTR
The string displayed when generating a moc file from a cpp file.
If this is not set, then $QT_MOCFROMHCOM (the command line) is displayed.
QT_MOCFROMHFLAGSDefault value is ''. These flags are passed to moc, when moccing a header file.
QT_MOCHPREFIXDefault value is 'moc_'. Prefix for moc output files, when source is a header.
QT_MOCHSUFFIX
Default value is '$CXXFILESUFFIX'. Suffix for moc output files, when source is
a header.
QT_UIC
Default value is '$QT_BINPATH/uic'.
QT_UICCOMCommand to generate header files from .ui files.
QT_UICCOMSTR
The string displayed when generating header files from .ui files.
If this is not set, then $QT_UICCOM (the command line) is displayed.
QT_UICDECLFLAGSDefault value is ''. These flags are passed to uic, when creating a a h file from a .ui file.
QT_UICDECLPREFIXDefault value is ''. Prefix for uic generated header files.
QT_UICDECLSUFFIXDefault value is '.h'. Suffix for uic generated header files.
QT_UICIMPLFLAGSDefault value is ''. These flags are passed to uic, when creating a cxx file from a .ui file.
QT_UICIMPLPREFIXDefault value is 'uic_'. Prefix for uic generated implementation files.
QT_UICIMPLSUFFIX
Default value is '$CXXFILESUFFIX'. Suffix for uic generated implementation
files.
QT_UISUFFIXDefault value is '.ui'. Suffix of designer input files.
QTDIR
The qt tool tries to take this from os.environ.
It also initializes all QT_*
construction variables listed below.
(Note that all paths are constructed
with python's os.path.join() method,
but are listed here with the '/' separator
for easier reading.)
In addition, the construction environment
variables $CPPPATH,
$LIBPATH and
$LIBS may be modified
and the variables
PROGEMITTER, SHLIBEMITTER and LIBEMITTER
are modified. Because the build-performance is affected when using this tool,
you have to explicitly specify it at Environment creation:
Environment(tools=['default','qt'])
The qt tool supports the following operations:
Automatic moc file generation from header files. You do not have to specify moc files explicitly, the tool does it for you. However, there are a few preconditions to do so: Your header file must have the same filebase as your implementation file and must stay in the same directory. It must have one of the suffixes .h, .hpp, .H, .hxx, .hh. You can turn off automatic moc file generation by setting QT_AUTOSCAN to 0. See also the corresponding builder method .B Moc()
Automatic moc file generation from cxx files.
As stated in the qt documentation, include the moc file at the end of
the cxx file. Note that you have to include the file, which is generated
by the transformation ${QT_MOCCXXPREFIX}<basename>${QT_MOCCXXSUFFIX}, by default
<basename>.moc. A warning is generated after building the moc file, if you
do not include the correct file. If you are using BuildDir, you may
need to specify duplicate=1. You can turn off automatic moc file generation
by setting QT_AUTOSCAN to 0. See also the corresponding
Moc
builder method.
Automatic handling of .ui files.
The implementation files generated from .ui files are handled much the same
as yacc or lex files. Each .ui file given as a source of Program, Library or
SharedLibrary will generate three files, the declaration file, the
implementation file and a moc file. Because there are also generated headers,
you may need to specify duplicate=1 in calls to BuildDir.
See also the corresponding
Uic
builder method.
RANLIBThe archive indexer.
RANLIBCOMThe command line used to index a static library archive.
RANLIBCOMSTR
The string displayed when a static library archive is indexed.
If this is not set, then $RANLIBCOM (the command line) is displayed.
env = Environment(RANLIBCOMSTR = "Indexing $TARGET")
RANLIBFLAGSGeneral options passed to the archive indexer.
RCThe resource compiler used to build a Microsoft Visual C++ resource file.
RCCOMThe command line used to build a Microsoft Visual C++ resource file.
RCCOMSTR
The string displayed when invoking the resource compiler
to build a Microsoft Visual C++ resource file.
If this is not set, then $RCCOM (the command line) is displayed.
RCFLAGSThe flags passed to the resource compiler by the RES builder.
RCINCFLAGS
An automatically-generated construction variable
containing the command-line options
for specifying directories to be searched
by the resource compiler.
The value of $RCINCFLAGS is created
by appending $RCINCPREFIX and $RCINCSUFFIX
to the beginning and end
of each directory in $CPPPATH.
RCINCPREFIX
The prefix (flag) used to specify an include directory
on the resource compiler command line.
This will be appended to the beginning of each directory
in the $CPPPATH construction variable
when the $RCINCFLAGS variable is expanded.
RCINCSUFFIX
The suffix used to specify an include directory
on the resource compiler command line.
This will be appended to the end of each directory
in the $CPPPATH construction variable
when the $RCINCFLAGS variable is expanded.
RCS
The RCS executable.
Note that this variable is not actually used
for the command to fetch source files from RCS;
see the
$RCS_CO
construction variable, below.
RCS_COThe RCS "checkout" executable, used to fetch source files from RCS.
RCS_COCOMThe command line used to fetch (checkout) source files from RCS.
RCS_COCOMSTR
The string displayed when fetching
a source file from RCS.
If this is not set, then $RCS_COCOM
(the command line) is displayed.
RCS_COFLAGS
Options that are passed to the $RCS_CO command.
RDirsA function that converts a string into a list of Dir instances by searching the repositories.
REGSVR
The program used on Windows systems
to register a newly-built DLL library
whenever the SharedLibrary builder
is passed a keyword argument of register=1.
REGSVRCOM
The command line used on Windows systems
to register a newly-built DLL library
whenever the SharedLibrary builder
is passed a keyword argument of register=1.
REGSVRCOMSTR
The string displayed when registering a newly-built DLL file.
If this is not set, then $REGSVRCOM (the command line) is displayed.
REGSVRFLAGS
Flags passed to the DLL registration program
on Windows systems when a newly-built DLL library is registered.
By default,
this includes the /s
that prevents dialog boxes from popping up
and requiring user attention.
RMICThe Java RMI stub compiler.
RMICCOM
The command line used to compile stub
and skeleton class files
from Java classes that contain RMI implementations.
Any options specified in the $RMICFLAGS