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.
__LDMODULEVERSIONFLAGS
This construction variable automatically introduces $_LDMODULEVERSIONFLAGS
if $LDMODULEVERSION
is set. Othervise it evaluates to an empty string.
__SHLIBVERSIONFLAGS
This construction variable automatically introduces $_SHLIBVERSIONFLAGS
if $SHLIBVERSION
is set. Othervise it evaluates to an empty string.
APPLELINK_COMPATIBILITY_VERSION
On Mac OS X this is used to set the linker flag: -compatibility_version
The value is specified as X[.Y[.Z]] where X is between 1 and 65535, Y can be omitted or between 1 and
255, Z can be omitted or between 1 and 255. This value will be derived from $SHLIBVERSION
if
not
specified. The lowest digit will be dropped and replaced by a 0.
If the $APPLELINK_NO_COMPATIBILITY_VERSION
is set then no -compatibility_version will be
output.
See MacOS's ld manpage for more details
_APPLELINK_COMPATIBILITY_VERSION
A macro (by default a generator function) used to create the linker flags to specify
apple's linker's -compatibility_version flag.
The default generator uses $APPLELINK_COMPATIBILITY_VERSION
and $APPLELINK_NO_COMPATIBILITY_VERSION
and $SHLIBVERSION
to determine the correct flag.
APPLELINK_CURRENT_VERSION
On Mac OS X this is used to set the linker flag: -current_version
The value is specified as X[.Y[.Z]] where X is between 1 and 65535, Y can be omitted or between 1 and
255, Z can be omitted or between 1 and 255. This value will be set to $SHLIBVERSION
if not
specified.
If the $APPLELINK_NO_CURRENT_VERSION
is set then no -current_version will be
output.
See MacOS's ld manpage for more details
_APPLELINK_CURRENT_VERSION
A macro (by default a generator function) used to create the linker flags to specify apple's linker's
-current_version flag. The default generator uses $APPLELINK_CURRENT_VERSION
and
$APPLELINK_NO_CURRENT_VERSION
and $SHLIBVERSION
to determine the correct flag.
APPLELINK_NO_COMPATIBILITY_VERSION
Set this to any True (1|True|non-empty string) value to disable adding -compatibility_version flag when generating versioned shared libraries.
This overrides $APPLELINK_COMPATIBILITY_VERSION
.
APPLELINK_NO_CURRENT_VERSION
Set this to any True (1|True|non-empty string) value to disable adding -current_version flag when generating versioned shared libraries.
This overrides $APPLELINK_CURRENT_VERSION
.
AR
The static library archiver.
ARCHITECTURE
Specifies 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 the BuildArch:
field
in the RPM .spec
file,
as well as forming part of the name of a generated RPM package file.
See the Package
builder.
ARCOM
The command line used to generate a static library from object files.
ARCOMSTR
The string displayed when a static library is
generated from object files.
If this is not set, then $ARCOM
(the command line) is displayed.
env = Environment(ARCOMSTR = "Archiving $TARGET")
ARFLAGS
General options passed to the static library archiver.
AS
The assembler.
ASCOM
The 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")
ASFLAGS
General 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
.
BIBTEX
The bibliography generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter.
BIBTEXCOM
The 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")
BIBTEXFLAGS
General options passed to the bibliography generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter.
BUILDERS
A dictionary mapping the names of the builders available through the construction environment to underlying Builder objects. Custom builders need to be added to this to make them available.
A platform-dependent default list of builders such as
Program
, Library
etc. is used to
populate this construction variable when the construction environment is initialized
via the presence/absence of the tools those builders depend on.
$BUILDERS
can be examined to learn which builders will
actually be available at run-time.
Note that if you initialize this construction variable through
assignment when the construction environment is created,
that value for $BUILDERS
will override any defaults:
bld = Builder(action='foobuild < $SOURCE > $TARGET') env = Environment(BUILDERS={'NewBuilder': bld})
To instead use a new Builder object in addition to the default Builders, add your new Builder object like this:
env = Environment() env.Append(BUILDERS={'NewBuilder': bld})
or this:
env = Environment() env['BUILDERS']['NewBuilder'] = bld
CACHEDIR_CLASS
The class type that SCons should use when instantiating a
new CacheDir
in this construction environment. Must be
a subclass of the SCons.CacheDir.CacheDir
class.
CC
The 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.
See also $SHCCCOM
for compiling to shared objects.
CCCOMSTR
If set, the string displayed when a C source file
is compiled to a (static) object file.
If not set, then $CCCOM
(the command line) is displayed.
See also $SHCCCOMSTR
for compiling to shared objects.
env = Environment(CCCOMSTR = "Compiling static object $TARGET")
CCDEPFLAGS
Options to pass to C or C++ compiler to generate list of dependency files.
This is set only by compilers which support this functionality. (gcc
, clang
, and msvc
currently)
CCFLAGS
General options that are passed to the C and C++ compilers.
See also $SHCCFLAGS
for compiling to shared objects.
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 Microsoft 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:
env['CCPDBFLAGS'] = ['${(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'
CCVERSION
The version number of the C compiler. This may or may not be set, depending on the specific C compiler being used.
CFILESUFFIX
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.
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.
CFLAGS
General options that are passed to the C compiler (C only; not C++).
See also $SHCFLAGS
for compiling to shared objects.
CHANGE_SPECFILE
A 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.
See the Package
builder.
CHANGED_SOURCES
A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" for more information).
CHANGED_TARGETS
A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" for more information).
CHANGELOG
The 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.
See the Package
builder.
COMPILATIONDB_COMSTR
The string displayed when the CompilationDatabase
builder's action is run.
COMPILATIONDB_PATH_FILTER
A string which instructs CompilationDatabase
to
only include entries where the output
member
matches the pattern in the filter string using fnmatch, which
uses glob style wildcards.
The default value is an empty string '', which disables filtering.
COMPILATIONDB_USE_ABSPATH
A boolean flag to instruct CompilationDatabase
whether to write the file
and
output
members
in the compilation database using absolute or relative paths.
The default value is False (use relative paths)
_concat
A function used to produce variables like $_CPPINCFLAGS
. It takes
four mandatory arguments, and up to 4 additional optional arguments:
1) a prefix to concatenate onto each element,
2) a list of elements,
3) a suffix to concatenate onto each element,
4) an environment for variable interpolation,
5) an optional function that will be called to transform the list before concatenation,
6) an optionally specified target (Can use TARGET),
7) an optionally specified source (Can use SOURCE),
8) optional affect_signature
flag which will wrap non-empty returned value with $( and $) to indicate the contents
should not affect the signature of the generated command line.
env['_CPPINCFLAGS'] = '${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs, TARGET, SOURCE, affect_signature=False)}'
CONFIGUREDIR
The 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.
If variant directories are in use,
and the configure check results should not be
shared between variants,
you can set $CONFIGUREDIR
and $CONFIGURELOG
so they are
unique per variant directory.
CONFIGURELOG
The name of the Configure
context log file.
The default is
config.log
in the top-level directory
containing the
SConstruct
file.
If variant directories are in use,
and the configure check results should not be
shared between variants,
you can set $CONFIGUREDIR
and $CONFIGURELOG
so they are
unique per variant directory.
_CPPDEFFLAGS
An automatically-generated construction variable
containing the C preprocessor command-line options
to define values.
The value of $_CPPDEFFLAGS
is created
by respectively prepending and appending
$CPPDEFPREFIX
and $CPPDEFSUFFIX
to each definition in $CPPDEFINES
.
CPPDEFINES
A platform independent specification of C preprocessor macro definitions.
The definitions are added to command lines
through the automatically-generated
$_CPPDEFFLAGS
construction variable,
which is constructed according to
the contents of $CPPDEFINES
:
If $CPPDEFINES
is a string,
the values of the
$CPPDEFPREFIX
and $CPPDEFSUFFIX
construction variables
are respectively prepended and appended to
each definition in $CPPDEFINES
,
split on whitespace.
# Adds -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
are respectively prepended and appended to
each element in the list.
If any element is a tuple (or list)
then the first item of the tuple is the macro name
and the second is the macro definition.
If the definition is not omitted or None
,
the name and definition are combined into a single
name=definition
item
before the preending/appending.
# Adds -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
are respectively prepended and appended to
each key from the dictionary.
If the value for a key is not None
,
then the key (macro name) and the value
(macros definition) are combined into a single
name=definition
item
before the prepending/appending.
# Adds -DA -DB=2 to POSIX compiler command lines, # or /DA /DB=2 to Microsoft Visual C++ command lines. env = Environment(CPPDEFINES={'B':2, 'A':None})
Depending on how contents are added to $CPPDEFINES
,
it may be transformed into a compound type,
for example a list containing strings, tuples and/or dictionaries.
SCons can correctly expand such a compound type.
Note that SCons may call the compiler via a shell. If a macro definition contains characters such as spaces that have meaning to the shell, or is intended to be a string value, you may need to use the shell's quoting syntax to avoid interpretation by the shell before the preprocessor sees it. Function-like macros are not supported via this mechanism (and some compilers do not even implement that functionality via the command lines). When quoting, note that one set of quote characters are used to define a Python string, then quotes embedded inside that would be consumed by the shell unless escaped. These examples may help illustrate:
env = Environment(CPPDEFINES=['USE_ALT_HEADER=\\"foo_alt.h\\"']) env = Environment(CPPDEFINES=[('USE_ALT_HEADER', '\\"foo_alt.h\\"')])
:Changed in version 4.5:
SCons no longer sorts $CPPDEFINES
values entered
in dictionary form. Python now preserves dictionary
keys in the order they are entered, so it is no longer
necessary to sort them to ensure a stable command line.
CPPDEFPREFIX
The prefix used to specify preprocessor macro definitions
on the C compiler command line.
This will be prepended to each definition
in the $CPPDEFINES
construction variable
when the $_CPPDEFFLAGS
variable is automatically generated.
CPPDEFSUFFIX
The suffix used to specify preprocessor macro definitions
on the C compiler command line.
This will be appended to 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 respectively prepending and appending
$INCPREFIX
and $INCSUFFIX
to each directory in $CPPPATH
.
CPPPATH
The 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.
In general it's not advised to put include directory directives
directly into $CCFLAGS
or $CXXFLAGS
as the result will be non-portable
and the directories will not be searched by the dependency scanner.
$CPPPATH
should be a list of path strings,
or a single string, not a pathname list joined by
Python's os.pathsep
.
Note:
directory names in $CPPPATH
will be looked-up relative to the directory of the SConscript file
when they are used in a command.
To force scons
to look-up a directory relative to the root of the source tree use
the #
prefix:
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
respectively prepending and appending the values of the
$INCPREFIX
and $INCSUFFIX
construction variables
to 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")
CPPSUFFIXES
The 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"]
CXX
The C++ compiler.
See also $SHCXX
for compiling to shared objects..
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.
See also $SHCXXCOM
for compiling to shared objects..
CXXCOMSTR
If set, the string displayed when a C++ source file
is compiled to a (static) object file.
If not set, then $CXXCOM
(the command line) is displayed.
See also $SHCXXCOMSTR
for compiling to shared objects..
env = Environment(CXXCOMSTR = "Compiling static object $TARGET")
CXXFILESUFFIX
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.
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
.
See also $SHCXXFLAGS
for compiling to shared objects..
CXXVERSION
The version number of the C++ compiler. This may or may not be set, depending on the specific C++ compiler being used.
DC
The D compiler to use.
See also $SHDC
for compiling to shared objects.
DCOM
The command line used to compile a D file to an object file.
Any options specified in the $DFLAGS
construction variable
is included on this command line.
See also $SHDCOM
for compiling to shared objects.
DCOMSTR
If set, the string displayed when a D source file
is compiled to a (static) object file.
If not set, then $DCOM
(the command line) is displayed.
See also $SHDCOMSTR
for compiling to shared objects.
DDEBUG
List of debug tags to enable when compiling.
DDEBUGPREFIX
DDEBUGPREFIX.
DDEBUGSUFFIX
DDEBUGSUFFIX.
DESCRIPTION
A long description of the project being packaged. This is included in the relevant section of the file that controls the packaging build.
See the Package
builder.
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.
See the Package
builder.
DFILESUFFIX
DFILESUFFIX.
DFLAGPREFIX
DFLAGPREFIX.
DFLAGS
General options that are passed to the D compiler.
DFLAGSUFFIX
DFLAGSUFFIX.
DI_FILE_DIR
Path where .di files will be generated
DI_FILE_DIR_PREFIX
Prefix to send the di path argument to compiler
DI_FILE_DIR_SUFFFIX
Suffix to send the di path argument to compiler
DI_FILE_SUFFIX
Suffix of d include files default is .di
DINCPREFIX
DINCPREFIX.
DINCSUFFIX
DLIBFLAGSUFFIX.
Dir
A function that converts a string into a Dir instance relative to the target being built.
Dirs
A function that converts a list of strings into a list of Dir instances relative to the target being built.
DLIB
Name of the lib tool to use for D codes.
DLIBCOM
The command line to use when creating libraries.
DLIBDIRPREFIX
DLIBLINKPREFIX.
DLIBDIRSUFFIX
DLIBLINKSUFFIX.
DLIBFLAGPREFIX
DLIBFLAGPREFIX.
DLIBFLAGSUFFIX
DLIBFLAGSUFFIX.
DLIBLINKPREFIX
DLIBLINKPREFIX.
DLIBLINKSUFFIX
DLIBLINKSUFFIX.
DLINK
Name of the linker to use for linking systems including D sources.
See also $SHDLINK
for linking shared objects.
DLINKCOM
The command line to use when linking systems including D sources.
See also $SHDLINKCOM
for linking shared objects.
DLINKFLAGPREFIX
DLINKFLAGPREFIX.
DLINKFLAGS
List of linker flags.
See also $SHDLINKFLAGS
for linking shared objects.
DLINKFLAGSUFFIX
DLINKFLAGSUFFIX.
DOCBOOK_DEFAULT_XSL_EPUB
The default XSLT file for the DocbookEpub
builder within the
current environment, if no other XSLT gets specified via keyword.
DOCBOOK_DEFAULT_XSL_HTML
The default XSLT file for the DocbookHtml
builder within the
current environment, if no other XSLT gets specified via keyword.
DOCBOOK_DEFAULT_XSL_HTMLCHUNKED
The default XSLT file for the DocbookHtmlChunked
builder within the
current environment, if no other XSLT gets specified via keyword.
DOCBOOK_DEFAULT_XSL_HTMLHELP
The default XSLT file for the DocbookHtmlhelp
builder within the
current environment, if no other XSLT gets specified via keyword.
DOCBOOK_DEFAULT_XSL_MAN
The default XSLT file for the DocbookMan
builder within the
current environment, if no other XSLT gets specified via keyword.
DOCBOOK_DEFAULT_XSL_PDF
The default XSLT file for the DocbookPdf
builder within the
current environment, if no other XSLT gets specified via keyword.
DOCBOOK_DEFAULT_XSL_SLIDESHTML
The default XSLT file for the DocbookSlidesHtml
builder within the
current environment, if no other XSLT gets specified via keyword.
DOCBOOK_DEFAULT_XSL_SLIDESPDF
The default XSLT file for the DocbookSlidesPdf
builder within the
current environment, if no other XSLT gets specified via keyword.
DOCBOOK_FOP
The path to the PDF renderer fop
or xep
,
if one of them is installed (fop
gets checked first).
DOCBOOK_FOPCOM
The full command-line for the
PDF renderer fop
or xep
.
DOCBOOK_FOPCOMSTR
The string displayed when a renderer like fop
or
xep
is used to create PDF output from an XML file.
DOCBOOK_FOPFLAGS
Additonal command-line flags for the
PDF renderer fop
or xep
.
DOCBOOK_XMLLINT
The path to the external executable xmllint
, if it's installed.
Note, that this is only used as last fallback for resolving
XIncludes, if no lxml Python binding can be imported
in the current system.
DOCBOOK_XMLLINTCOM
The full command-line for the external executable
xmllint
.
DOCBOOK_XMLLINTCOMSTR
The string displayed when xmllint
is used to resolve
XIncludes for a given XML file.
DOCBOOK_XMLLINTFLAGS
Additonal command-line flags for the external executable
xmllint
.
DOCBOOK_XSLTPROC
The path to the external executable xsltproc
(or saxon
, xalan
), if one of them
is installed.
Note, that this is only used as last fallback for XSL transformations, if
no lxml Python binding can be imported in the current system.
DOCBOOK_XSLTPROCCOM
The full command-line for the external executable
xsltproc
(or saxon
,
xalan
).
DOCBOOK_XSLTPROCCOMSTR
The string displayed when xsltproc
is used to transform
an XML file via a given XSLT stylesheet.
DOCBOOK_XSLTPROCFLAGS
Additonal command-line flags for the external executable
xsltproc
(or saxon
,
xalan
).
DOCBOOK_XSLTPROCPARAMS
Additonal parameters that are not intended for the XSLT processor executable, but
the XSL processing itself. By default, they get appended at the end of the command line
for saxon
and saxon-xslt
, respectively.
DPATH
List of paths to search for import modules.
DRPATHPREFIX
DRPATHPREFIX.
DRPATHSUFFIX
DRPATHSUFFIX.
DSUFFIXES
The list of suffixes of files that will be scanned
for imported D package files.
The default list is ['.d']
.
DVERPREFIX
DVERPREFIX.
DVERSIONS
List of version tags to enable when compiling.
DVERSUFFIX
DVERSUFFIX.
DVIPDF
The TeX DVI file to PDF file converter.
DVIPDFCOM
The 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.
DVIPDFFLAGS
General options passed to the TeX DVI file to PDF file converter.
DVIPS
The TeX DVI file to PostScript converter.
DVIPSFLAGS
General options passed to the TeX DVI file to PostScript converter.
ENV
The execution environment -
a dictionary of environment variables
used when SCons invokes external commands
to build targets defined in this construction environment.
When $ENV
is passed to a command,
all list values are assumed to be path lists and
are joined using the search path separator.
Any other non-string values are coerced to a string.
Note that by default
SCons
does
not
propagate the environment in effect when you execute
scons (the "shell environment")
to the execution environment.
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 a
shell environment variable
to the commands executed
to build target files,
you must do so explicitly.
A common example is
the system PATH
environment variable,
so that
scons
will find utilities the same way
as the invoking shell (or other process):
import os env = Environment(ENV={'PATH': os.environ['PATH']})
Although it is usually not recommended, you can propagate the entire shell environment in one go:
import os env = Environment(ENV=os.environ.copy())
ESCAPE
A 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.
F03
The Fortran 03 compiler.
You should normally set the $FORTRAN
variable,
which specifies the default Fortran compiler
for all Fortran versions.
You only need to set $F03
if you need to use a specific compiler
or compiler version for Fortran 03 files.
F03COM
The command line used to compile a Fortran 03 source file to an object file.
You only need to set $F03COM
if you need to use a specific
command line for Fortran 03 files.
You should normally set the $FORTRANCOM
variable,
which specifies the default command line
for all Fortran versions.
F03COMSTR
If set, the string displayed when a Fortran 03 source file
is compiled to an object file.
If not set, then $F03COM
or $FORTRANCOM
(the command line) is displayed.
F03FILESUFFIXES
The list of file extensions for which the F03 dialect will be used. By
default, this is ['.f03']
F03FLAGS
General user-specified options that are passed to the Fortran 03 compiler.
Note that this variable does
not
contain
-I
(or similar) include search path options
that scons generates automatically from $F03PATH
.
See
$_F03INCFLAGS
below,
for the variable that expands to those options.
You only need to set $F03FLAGS
if you need to define specific
user options for Fortran 03 files.
You should normally set the $FORTRANFLAGS
variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
_F03INCFLAGS
An automatically-generated construction variable
containing the Fortran 03 compiler command-line options
for specifying directories to be searched for include files.
The value of $_F03INCFLAGS
is created
by appending $INCPREFIX
and $INCSUFFIX
to the beginning and end
of each directory in $F03PATH
.
F03PATH
The list of directories that the Fortran 03 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 $F03FLAGS
because the result will be non-portable
and the directories will not be searched by the dependency scanner. Note:
directory names in $F03PATH
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 $F03PATH
if you need to define a specific
include path for Fortran 03 files.
You should normally set the $FORTRANPATH
variable,
which specifies the include path
for the default Fortran compiler
for all Fortran versions.
env = Environment(F03PATH='#/include')
The directory look-up can also be forced using the
Dir
()
function:
include = Dir('include') env = Environment(F03PATH=include)
The directory list will be added to command lines
through the automatically-generated
$_F03INCFLAGS
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 $F03PATH
.
Any command lines you define that need
the F03PATH directory list should
include $_F03INCFLAGS
:
env = Environment(F03COM="my_compiler $_F03INCFLAGS -c -o $TARGET $SOURCE")
F03PPCOM
The command line used to compile a Fortran 03 source file to an object file
after first running the file through the C preprocessor.
Any options specified in the $F03FLAGS
and $CPPFLAGS
construction variables
are included on this command line.
You only need to set $F03PPCOM
if you need to use a specific
C-preprocessor command line for Fortran 03 files.
You should normally set the $FORTRANPPCOM
variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
F03PPCOMSTR
If set, the string displayed when a Fortran 03 source file
is compiled to an object file
after first running the file through the C preprocessor.
If not set, then $F03PPCOM
or $FORTRANPPCOM
(the command line) is displayed.
F03PPFILESUFFIXES
The list of file extensions for which the compilation + preprocessor pass for F03 dialect will be used. By default, this is empty.
F08
The Fortran 08 compiler.
You should normally set the $FORTRAN
variable,
which specifies the default Fortran compiler
for all Fortran versions.
You only need to set $F08
if you need to use a specific compiler
or compiler version for Fortran 08 files.
F08COM
The command line used to compile a Fortran 08 source file to an object file.
You only need to set $F08COM
if you need to use a specific
command line for Fortran 08 files.
You should normally set the $FORTRANCOM
variable,
which specifies the default command line
for all Fortran versions.
F08COMSTR
If set, the string displayed when a Fortran 08 source file
is compiled to an object file.
If not set, then $F08COM
or $FORTRANCOM
(the command line) is displayed.
F08FILESUFFIXES
The list of file extensions for which the F08 dialect will be used. By
default, this is ['.f08']
F08FLAGS
General user-specified options that are passed to the Fortran 08 compiler.
Note that this variable does
not
contain
-I
(or similar) include search path options
that scons generates automatically from $F08PATH
.
See
$_F08INCFLAGS
below,
for the variable that expands to those options.
You only need to set $F08FLAGS
if you need to define specific
user options for Fortran 08 files.
You should normally set the $FORTRANFLAGS
variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
_F08INCFLAGS
An automatically-generated construction variable
containing the Fortran 08 compiler command-line options
for specifying directories to be searched for include files.
The value of $_F08INCFLAGS
is created
by appending $INCPREFIX
and $INCSUFFIX
to the beginning and end
of each directory in $F08PATH
.
F08PATH
The list of directories that the Fortran 08 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 $F08FLAGS
because the result will be non-portable
and the directories will not be searched by the dependency scanner. Note:
directory names in $F08PATH
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 $F08PATH
if you need to define a specific
include path for Fortran 08 files.
You should normally set the $FORTRANPATH
variable,
which specifies the include path
for the default Fortran compiler
for all Fortran versions.
env = Environment(F08PATH='#/include')
The directory look-up can also be forced using the
Dir
()
function:
include = Dir('include') env = Environment(F08PATH=include)
The directory list will be added to command lines
through the automatically-generated
$_F08INCFLAGS
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 $F08PATH
.
Any command lines you define that need
the F08PATH directory list should
include $_F08INCFLAGS
:
env = Environment(F08COM="my_compiler $_F08INCFLAGS -c -o $TARGET $SOURCE")
F08PPCOM
The command line used to compile a Fortran 08 source file to an object file
after first running the file through the C preprocessor.
Any options specified in the $F08FLAGS
and $CPPFLAGS
construction variables
are included on this command line.
You only need to set $F08PPCOM
if you need to use a specific
C-preprocessor command line for Fortran 08 files.
You should normally set the $FORTRANPPCOM
variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
F08PPCOMSTR
If set, the string displayed when a Fortran 08 source file
is compiled to an object file
after first running the file through the C preprocessor.
If not set, then $F08PPCOM
or $FORTRANPPCOM
(the command line) is displayed.
F08PPFILESUFFIXES
The list of file extensions for which the compilation + preprocessor pass for F08 dialect will be used. By default, this is empty.
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
If set, the string displayed when a Fortran 77 source file
is compiled to an object file.
If not set, then $F77COM
or $FORTRANCOM
(the command line) is displayed.
F77FILESUFFIXES
The list of file extensions for which the F77 dialect will be used. By
default, this is ['.f77']
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
If set, 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 not set, then $F77PPCOM
or $FORTRANPPCOM
(the command line) is displayed.
F77PPFILESUFFIXES
The list of file extensions for which the compilation + preprocessor pass for F77 dialect will be used. By default, this is empty.
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
If set, the string displayed when a Fortran 90 source file
is compiled to an object file.
If not set, then $F90COM
or $FORTRANCOM
(the command line) is displayed.
F90FILESUFFIXES
The list of file extensions for which the F90 dialect will be used. By
default, this is ['.f90']
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
If set, the string displayed when a Fortran 90 source file
is compiled after first running the file through the C preprocessor.
If not set, then $F90PPCOM
or $FORTRANPPCOM
(the command line) is displayed.
F90PPFILESUFFIXES
The list of file extensions for which the compilation + preprocessor pass for F90 dialect will be used. By default, this is empty.
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
If set, the string displayed when a Fortran 95 source file
is compiled to an object file.
If not set, then $F95COM
or $FORTRANCOM
(the command line) is displayed.
F95FILESUFFIXES
The list of file extensions for which the F95 dialect will be used. By
default, this is ['.f95']
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
If set, 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 not set, then $F95PPCOM
or $FORTRANPPCOM
(the command line) is displayed.
F95PPFILESUFFIXES
The list of file extensions for which the compilation + preprocessor pass for F95 dialect will be used. By default, this is empty.
File
A function that converts a string into a File instance relative to the target being built.
FILE_ENCODING
File encoding used for files written by Textfile
and Substfile
.
Set to "utf-8" by default.
New in version 4.5.0.
FORTRAN
The 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
,
$_FORTRANMODFLAG
, and
$_FORTRANINCFLAGS
construction variables are included on this command line.
FORTRANCOMMONFLAGS
General user-specified options that are passed to the Fortran compiler.
Similar to $FORTRANFLAGS
,
but this construction variable is applied to all dialects.
New in version 4.4.
FORTRANCOMSTR
If set, the string displayed when a Fortran source file
is compiled to an object file.
If not set, then $FORTRANCOM
(the command line) is displayed.
FORTRANFILESUFFIXES
The list of file extensions for which the FORTRAN dialect will be used. By
default, this is ['.f', '.for', '.ftn']
FORTRANFLAGS
General user-specified options for the FORTRAN dialect
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
for the construction 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 respectively prepending and appending
$INCPREFIX
and $INCSUFFIX
to the beginning and end
of each directory in $FORTRANPATH
.
FORTRANMODDIR
Directory 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 prepended 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 end 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 respectively prepending and appending
$FORTRANMODDIRPREFIX
and $FORTRANMODDIRSUFFIX
to the beginning and end of the directory in $FORTRANMODDIR
.
FORTRANMODPREFIX
The 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.
FORTRANMODSUFFIX
The 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.
FORTRANPATH
The 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
respectively prepending and 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
If set, the string displayed when a Fortran source file
is compiled to an object file
after first running the file through the C preprocessor.
If not set, then $FORTRANPPCOM
(the command line) is displayed.
FORTRANPPFILESUFFIXES
The list of file extensions for which the compilation + preprocessor pass for
FORTRAN dialect will be used. By default, this is ['.fpp', '.FPP']
FORTRANSUFFIXES
The 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
.
FRAMEWORKS
On 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'))
_FRAMEWORKS
On Mac OS X with gcc, an automatically-generated construction variable containing the linker command-line options for linking with FRAMEWORKS.
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 superseded by
the $FRAMEWORKPATH
, $FRAMEWORKPATHPREFIX
,
$FRAMEWORKPREFIX
and $FRAMEWORKS
variables
described above.)
GS
The Ghostscript program used to, for example, convert PostScript to PDF files.
GSCOM
The full Ghostscript command line used for the conversion process. Its default
value is “$GS $GSFLAGS -sOutputFile=$TARGET $SOURCES
”.
GSCOMSTR
The string displayed when
Ghostscript is called for the conversion process.
If this is not set (the default), then $GSCOM
(the command line) is displayed.
GSFLAGS
General options passed to the Ghostscript program,
when converting PostScript to PDF files for example. Its default value
is “-dNOPAUSE -dBATCH -sDEVICE=pdfwrite
”
HOST_ARCH
The name of the host hardware architecture
used to create this construction environment.
The platform code sets this when initializing
(see $PLATFORM
and the
platform
argument to Environment
).
Note the detected name of the architecture may not be identical to
that returned by the Python
platform.machine
method.
On the win32
platform,
if the Microsoft Visual C++ compiler is available,
msvc
tool setup is done using
$HOST_ARCH
and $TARGET_ARCH
.
Changing the values at any later time will not cause
the tool to be reinitialized.
Valid host arch values are
x86
and arm
for 32-bit hosts and
amd64
, arm64
,
and x86_64
for 64-bit hosts.
Should be considered immutable.
$HOST_ARCH
is not currently used by other platforms,
but the option is reserved to do so in future
HOST_OS
The name of the host operating system for the platform
used to create this construction environment.
The platform code sets this when initializing
(see $PLATFORM
and the
platform
argument to Environment
).
Should be considered immutable.
$HOST_OS
is not currently used by SCons,
but the option is reserved to do so in future
IDLSUFFIXES
The list of suffixes of files that will be scanned for IDL implicit dependencies (#include or import lines). The default list is:
[".idl", ".IDL"]
IMPLIBNOVERSIONSYMLINKS
Used to override $SHLIBNOVERSIONSYMLINKS
/$LDMODULENOVERSIONSYMLINKS
when
creating versioned import library for a shared library/loadable module. If not defined,
then $SHLIBNOVERSIONSYMLINKS
/$LDMODULENOVERSIONSYMLINKS
is used to determine
whether to disable symlink generation or not.
IMPLIBPREFIX
The prefix used for import library names. For example, cygwin uses import
libraries (libfoo.dll.a
) in pair with dynamic libraries
(cygfoo.dll
). The cyglink
linker sets
$IMPLIBPREFIX
to 'lib'
and $SHLIBPREFIX
to 'cyg'
.
IMPLIBSUFFIX
The suffix used for import library names. For example, cygwin uses import
libraries (libfoo.dll.a
) in pair with dynamic libraries
(cygfoo.dll
). The cyglink
linker sets
$IMPLIBSUFFIX
to '.dll.a'
and $SHLIBSUFFIX
to '.dll'
.
IMPLIBVERSION
Used to override $SHLIBVERSION
/$LDMODULEVERSION
when
generating versioned import library for a shared library/loadable module. If
undefined, the $SHLIBVERSION
/$LDMODULEVERSION
is used to
determine the version of versioned import library.
IMPLICIT_COMMAND_DEPENDENCIES
Controls 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 of any
command line it executes (which is typically
the command itself). By setting such
a dependency, SCons can determine that
a target should be rebuilt if the command changes,
such as when a compiler is upgraded to a new version.
The specific file for the dependency is
found by searching the
PATH
variable in the
ENV
dictionary
in the construction environment used to execute the command.
The default is the same as
setting the construction variable
$IMPLICIT_COMMAND_DEPENDENCIES
to a True-like value (“true”,
“yes”,
or “1” - but not a number
greater than one, as that has a different meaning).
Action strings can be segmented by the
use of an AND operator, &&
.
In a segemented string, each segment is a separate
“command line”, these are run
sequentially until one fails or the entire
sequence has been executed. If an
action string is segmented, then the selected
behavior of $IMPLICIT_COMMAND_DEPENDENCIES
is applied to each segment.
If $IMPLICIT_COMMAND_DEPENDENCIES
is set to a False-like value
(“none”,
“false”,
“no”,
“0”,
etc.),
then the implicit dependency will
not be added to the targets
built with that construction environment.
If $IMPLICIT_COMMAND_DEPENDENCIES
is set to “2” or higher,
then that number of arguments in the command line
will be scanned for relative or absolute paths.
If any are present, they will be added as
implicit dependencies to the targets built
with that construction environment.
The first argument in the command line will be
searched for using the PATH
variable in the ENV
dictionary
in the construction environment used to execute the command.
The other arguments will only be found if they
are absolute paths or valid paths relative
to the working directory.
If $IMPLICIT_COMMAND_DEPENDENCIES
is set to “all”,
then all arguments in the command line will be
scanned for relative or absolute paths.
If any are present, they will be added as
implicit dependencies to the targets built
with that construction environment.
The first argument in the command line will be
searched for using the PATH
variable in the ENV
dictionary
in the construction environment used to execute the command.
The other arguments will only be found if they
are absolute paths or valid paths relative
to the working directory.
env = Environment(IMPLICIT_COMMAND_DEPENDENCIES=False)
INCPREFIX
The prefix used to specify an include directory on the C compiler command
line.
This will be prepended to 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 each directory
in the $CPPPATH
and $FORTRANPATH
construction variables
when the $_CPPINCFLAGS
and $_FORTRANINCFLAGS
variables are automatically generated.
INSTALL
A 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.
INSTALLSTR
The string displayed when a file is installed into a destination file name. The default is:
Install file: "$SOURCE" as "$TARGET"
INTEL_C_COMPILER_VERSION
Set by the intelc
Tool
to the major version number of the Intel C compiler
selected for use.
JAR
The Java archive tool.
JARCHDIR
The directory to which the Java archive tool should change
(using the
-C
option).
JARCOM
The 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.
JARSUFFIX
The suffix for Java archives:
.jar
by default.
JAVABOOTCLASSPATH
Specifies the location of the bootstrap class files. Can be specified as a string or Node object, or as a list of strings or Node objects.
The value will be added to the JDK command lines
via the -bootclasspath
option,
which requires a system-specific search path separator.
This will be supplied by SCons as needed when it
constructs the command line if $JAVABOOTCLASSPATH
is
provided in list form.
If $JAVABOOTCLASSPATH
is a single string containing
search path separator characters
(:
for POSIX systems or
;
for Windows), it will not be modified;
and so is inherently system-specific;
to supply the path in a system-independent manner,
give $JAVABOOTCLASSPATH
as a list of paths instead.
Can only be used when compiling for releases prior to JDK 9.
JAVAC
The 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")
JAVACFLAGS
General options that are passed to the Java compiler.
JAVACLASSDIR
The 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 class search path for the JDK tools.
Can be specified as a string or Node object,
or as a list of strings or Node objects.
Class path entries may be directory names to search
for class files or packages, pathnames to archives
(.jar
or .zip
)
containing classes, or paths ending in a "base name wildcard"
character (*
), which matches files
in that directory with a .jar
suffix.
See the Java documentation for more details.
The value will be added to the JDK command lines
via the -classpath
option,
which requires a system-specific search path separator.
This will be supplied by SCons as needed when it
constructs the command line if $JAVACLASSPATH
is
provided in list form.
If $JAVACLASSPATH
is a single string containing
search path separator characters
(:
for POSIX systems or
;
for Windows),
it will be split on the separator into a list of individual
paths for dependency scanning purposes.
It will not be modified for JDK command-line usage,
so such a string is inherently system-specific;
to supply the path in a system-independent manner,
give $JAVACLASSPATH
as a list of paths instead.
SCons always
supplies a -sourcepath
when invoking the Java compiler javac,
regardless of the setting of $JAVASOURCEPATH
,
as it passes the path(s) to the source(s) supplied
in the call to the Java
builder via
-sourcepath
.
From the documentation of the standard Java toolkit for javac:
“If not compiling code for modules, if the
--source-path
or -sourcepath
option is not specified, then the user class path is also
searched for source files.”
Since -sourcepath
is always supplied,
javac will not use the contents of the value of
$JAVACLASSPATH
when searching for sources.
JAVACLASSSUFFIX
The suffix for Java class files;
.class
by default.
JAVAH
The 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")
JAVAHFLAGS
General options passed to the C header and stub file generator for Java classes.
JAVAINCLUDES
Include path for Java header files
(such as jni.h
).
JAVAPROCESSORPATH
Specifies the location of the annotation processor class files. Can be specified as a string or Node object, or as a list of strings or Node objects.
The value will be added to the JDK command lines
via the -processorpath
option,
which requires a system-specific search path separator.
This will be supplied by SCons as needed when it
constructs the command line if $JAVAPROCESSORPATH
is
provided in list form.
If $JAVAPROCESSORPATH
is a single string containing
search path separator characters
(:
for POSIX systems or
;
for Windows), it will not be modified;
and so is inherently system-specific;
to supply the path in a system-independent manner,
give $JAVAPROCESSORPATH
as a list of paths instead.
New in version 4.5.0
JAVASOURCEPATH
Specifies the list of directories that
will be searched for input (source)
.java
files.
Can be specified as a string or Node object,
or as a list of strings or Node objects.
The value will be added to the JDK command lines
via the -sourcepath
option,
which requires a system-specific search path separator,
This will be supplied by SCons as needed when it
constructs the command line if $JAVASOURCEPATH
is
provided in list form.
If $JAVASOURCEPATH
is a single string containing
search path separator characters
(:
for POSIX systems or
;
for Windows), it will not be modified,
and so is inherently system-specific;
to supply the path in a system-independent manner,
give $JAVASOURCEPATH
as a list of paths instead.
Note that the specified directories are only added to
the command line via the -sourcepath
option.
SCons does not currently search the
$JAVASOURCEPATH
directories for dependent
.java
files.
JAVASUFFIX
The suffix for Java files;
.java
by default.
JAVAVERSION
Specifies the Java version being used by the Java
builder. Set this to specify the version of Java targeted
by the javac compiler.
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 a version greater than
1.4
makes SCons realize that a build
with such a compiler is actually up to date.
The default is 1.4
.
While this is not primarily intended for
selecting one version of the Java compiler vs. another,
it does have that effect on the Windows platform. A
more precise approach is to set $JAVAC
(and related
construction variables for related utilities) to the path to the specific
Java compiler you want, if that is not the default compiler.
On non-Windows platforms, the
alternatives
system may provide a
way to adjust the default Java compiler without
having to specify explicit paths.
LATEX
The LaTeX structured formatter and typesetter.
LATEXCOM
The 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")
LATEXFLAGS
General 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.
LATEXSUFFIXES
The 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
If set, the string displayed when building loadable modules.
If not set, then $LDMODULECOM
(the command line) is displayed.
LDMODULEEMITTER
Contains the emitter specification for the
LoadableModule
builder.
The manpage section "Builder Objects" contains
general information on specifying emitters.
LDMODULEFLAGS
General user options passed to the linker for building loadable modules.
LDMODULENOVERSIONSYMLINKS
Instructs the LoadableModule
builder to not automatically create symlinks
for versioned modules. Defaults to $SHLIBNOVERSIONSYMLINKS
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
.
_LDMODULESONAME
A macro that automatically generates loadable module's SONAME based on $TARGET,
$LDMODULEVERSION and $LDMODULESUFFIX. Used by LoadableModule
builder
when the linker tool supports SONAME (e.g. gnulink
).
LDMODULESUFFIX
The suffix used for loadable module file names. On Mac OS X, this is null; on other systems, this is the same as $SHLIBSUFFIX.
LDMODULEVERSION
When this construction variable is defined, a versioned loadable module
is created by LoadableModule
builder. This activates the
$_LDMODULEVERSIONFLAGS
and thus modifies the $LDMODULECOM
as
required, adds the version number to the library name, and creates the symlinks
that are needed. $LDMODULEVERSION
versions should exist in the same
format as $SHLIBVERSION
.
_LDMODULEVERSIONFLAGS
This macro automatically introduces extra flags to $LDMODULECOM
when
building versioned LoadableModule
(that is when
$LDMODULEVERSION
is set). _LDMODULEVERSIONFLAGS
usually adds $SHLIBVERSIONFLAGS
and some extra dynamically generated
options (such as -Wl,-soname=$_LDMODULESONAME
). It is unused
by plain (unversioned) loadable modules.
LDMODULEVERSIONFLAGS
Extra flags added to $LDMODULECOM
when building versioned
LoadableModule
. These flags are only used when $LDMODULEVERSION
is
set.
LEX
The lexical analyzer generator.
LEX_HEADER_FILE
If supplied, generate a C header file with the name taken from this variable.
Will be emitted as a --header-file=
command-line option. Use this in preference to including
--header-file=
in $LEXFLAGS
directly.
LEX_TABLES_FILE
If supplied, write the lex tables to a file with the name
taken from this variable.
Will be emitted as a --tables-file=
command-line option. Use this in preference to including
--tables-file=
in $LEXFLAGS
directly.
LEXCOM
The 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")
LEXFLAGS
General options passed to the lexical analyzer generator.
In addition to passing the value on during invocation,
the lex
tool also examines this construction variable for options
which cause additional output files to be generated,
and adds those to the target list.
Recognized for this purpose are GNU flex options
--header-file=
and
--tables-file=
;
the output file is named by the option argument.
Note that files specified by --header-file=
and
--tables-file=
may not be properly handled
by SCons in all situations. Consider using
$LEX_HEADER_FILE
and $LEX_TABLES_FILE
instead.
LEXUNISTD
Used only on windows environments to set a lex flag to prevent 'unistd.h' from being included. The default value is '--nounistd'.
_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 respectively prepending and appending $LIBDIRPREFIX
and $LIBDIRSUFFIX
to each directory in $LIBPATH
.
LIBDIRPREFIX
The prefix used to specify a library directory on the linker command line.
This will be prepended to 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 each directory
in the $LIBPATH
construction variable
when the $_LIBDIRFLAGS
variable is automatically generated.
LIBEMITTER
Contains the emitter specification for the
StaticLibrary
builder.
The manpage section "Builder Objects" contains
general information on specifying emitters.
_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 respectively prepending and appending $LIBLINKPREFIX
and $LIBLINKSUFFIX
to each filename in $LIBS
.
LIBLINKPREFIX
The prefix used to specify a library to link on the linker command line.
This will be prepended to 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 each library
in the $LIBS
construction variable
when the $_LIBFLAGS
variable is automatically generated.
LIBLITERALPREFIX
If the linker supports command line syntax directing
that the argument specifying a library should be
searched for literally (without modification),
$LIBLITERALPREFIX
can be set to that indicator.
For example, the GNU linker follows this rule:
“
-l:foo
searches the library path
for a filename called foo
,
without converting it to
libfoo.so
or
libfoo.a
.
”
If $LIBLITERALPREFIX
is set,
SCons will not transform a string-valued entry in
$LIBS
that starts with that string.
The entry will still be surrounded with
$LIBLINKPREFIX
and $LIBLINKSUFFIX
on the command line.
This is useful, for example,
in directing that a static library
be used when both a static and dynamic library are available
and linker policy is to prefer dynamic libraries.
Compared to the example in $LIBS
,
env.Append(LIBS=":libmylib.a")
will let the linker select that specific (static)
library name if found in the library search path.
This differs from using a
File
object
to specify the static library,
as the latter bypasses the library search path entirely.
LIBPATH
The list of directories that will be searched for libraries
specified by the $LIBS
construction variable.
$LIBPATH
should be a list of path strings,
or a single string, not a pathname list joined by
Python's os.pathsep
.
Do not put library search directives directly
into $LINKFLAGS
or $SHLINKFLAGS
as the result will be non-portable.
Note:
directory names in $LIBPATH
will be looked-up relative to the
directory of the SConscript file
when they are used in a command.
To force scons
to look-up a directory relative to the root of the source tree use
the #
prefix:
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
respectively prepending and appending the values of the
$LIBDIRPREFIX
and $LIBDIRSUFFIX
construction variables
to 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")
LIBPREFIX
The 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
on the current platform.
When searching for library dependencies,
SCons will look for files with these prefixes,
the base library name,
and suffixes from the $LIBSUFFIXES
list.
LIBS
The list of libraries that will be added to the link line for linking with any executable program, shared library, or loadable module created by the construction environment or override.
For portability,
a string-valued library name should include
only the base library name,
without prefixes such as lib
or suffixes such as .so
or .dll
.
SCons will attempt to
strip prefixes from the $LIBPREFIXES
list
and suffixes from the $LIBSUFFIXES
list,
but depending on that behavior will make the build
less portable:
for example, on a POSIX system,
no attempt will be made to strip a suffix like
.dll
.
Library name strings in $LIBS
should not include a path component:
instead use $LIBPATH
to direct the compiler
to look for libraries in those paths,
plus any default paths the linker searches in.
If $LIBLITERALPREFIX
is set to a non-empty string,
then a string-valued $LIBS
entry
that starts with $LIBLITERALPREFIX
will cause the rest of the entry
to be searched for for unmodified,
but respecting normal library search paths
(this is an exception to the guideline above
about leaving off the prefix/suffix from the library name).
If a $LIBS
entry is a Node object
(either as returned by a previous Builder call,
or as the result of an explicit call to File
),
the pathname from that Node will be added to
$_LIBFLAGS
,
and thus to the link line,
unmodified - without adding
$LIBLINKPREFIX
or
$LIBLINKSUFFIX
.
Such entries are searched for literally
(including any path component);
the library search paths are not used.
For example:
env.Append(LIBS=File('/tmp/mylib.so'))
For each Builder call that causes linking with libraries,
SCons will add the libraries in the setting of $LIBS
in effect at that moment to the dependecy graph
as dependencies of the target being generated.
The library list will transformed to command line
arguments through the automatically-generated
$_LIBFLAGS
construction variable
which is constructed by
respectively prepending and appending the values of the
$LIBLINKPREFIX
and $LIBLINKSUFFIX
construction variables
to each library name.
Any command lines you define yourself that need
the libraries from $LIBS
should include $_LIBFLAGS
(as well as $_LIBDIRFLAGS
)
rather than $LIBS
.
For example:
env = Environment(LINKCOM="my_linker $_LIBDIRFLAGS $_LIBFLAGS -o $TARGET $SOURCE")
LIBSUFFIX
The 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.
on the current platform.
When searching for library dependencies,
SCons will look for files with prefixes from the $LIBPREFIXES
list,
the base library name,
and these suffixes.
LICENSE
The abbreviated name, preferably the SPDX code, of the license under which this project is released (GPL-3.0, LGPL-2.1, BSD-2-Clause etc.). See http://www.opensource.org/licenses/alphabetical for a list of license names and SPDX codes.
See the Package
builder.
LINESEPARATOR
The separator used by the Substfile
and Textfile
builders.
This value is used between sources when constructing the target.
It defaults to the current system line separator.
LINGUAS_FILE
The $LINGUAS_FILE
defines file(s) containing list of additional linguas
to be processed by POInit
, POUpdate
or MOFiles
builders. It also affects Translate
builder. If the variable contains
a string, it defines name of the list file. The $LINGUAS_FILE
may be a
list of file names as well. If $LINGUAS_FILE
is set to
True
(or non-zero numeric value), the list will be read from
default file named
LINGUAS
.
LINK
The linker.
See also $SHLINK
for linking shared objects.
On POSIX systems (those using the link
tool),
you should normally not change this value as it defaults
to a "smart" linker tool which selects a compiler
driver matching the type of source files in use.
So for example, if you set $CXX
to a specific
compiler name, and are compiling C++ sources,
the smartlink function will automatically select the same compiler
for linking.
LINKCOM
The command line used to link object files into an executable.
See also $SHLINKCOM
for linking shared objects.
LINKCOMSTR
If set, the string displayed when object files
are linked into an executable.
If not set, then $LINKCOM
(the command line) is displayed.
See also $SHLINKCOMSTR
. for linking shared objects.
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.
See also $SHLINKFLAGS
. for linking shared objects.
M4
The M4 macro preprocessor.
M4COM
The 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.
M4FLAGS
General options passed to the M4 macro preprocessor.
MAKEINDEX
The makeindex generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter.
MAKEINDEXCOM
The 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.
MAKEINDEXFLAGS
General options passed to the makeindex generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter.
MAXLINELENGTH
The 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.
MIDL
The Microsoft IDL compiler.
MIDLCOM
The command line used to pass files to the Microsoft IDL compiler.
MIDLCOMSTR
The string displayed when
the Microsoft IDL compiler is called.
If this is not set, then $MIDLCOM
(the command line) is displayed.
MIDLFLAGS
General options passed to the Microsoft IDL compiler.
MOSUFFIX
Suffix used for MO
files (default: '.mo'
).
See msgfmt
tool and MOFiles
builder.
MSGFMT
Absolute path to msgfmt(1) binary, found by
Detect()
.
See msgfmt
tool and MOFiles
builder.
MSGFMTCOM
Complete command line to run msgfmt(1) program.
See msgfmt
tool and MOFiles
builder.
MSGFMTCOMSTR
String to display when msgfmt(1) is invoked
(default: ''
, which means ``print $MSGFMTCOM
'').
See msgfmt
tool and MOFiles
builder.
MSGFMTFLAGS
Additional flags to msgfmt(1).
See msgfmt
tool and MOFiles
builder.
MSGINIT
Path to msginit(1) program (found via
Detect()
).
See msginit
tool and POInit
builder.
MSGINITCOM
Complete command line to run msginit(1) program.
See msginit
tool and POInit
builder.
MSGINITCOMSTR
String to display when msginit(1) is invoked
(default: ''
, which means ``print $MSGINITCOM
'').
See msginit
tool and POInit
builder.
MSGINITFLAGS
List of additional flags to msginit(1) (default:
[]
).
See msginit
tool and POInit
builder.
_MSGINITLOCALE
Internal ``macro''. Computes locale (language) name based on target filename
(default: '${TARGET.filebase}'
).
MSGMERGE
Absolute path to msgmerge(1) binary as found by
Detect()
.
See msgmerge
tool and POUpdate
builder.
MSGMERGECOM
Complete command line to run msgmerge(1) command.
See msgmerge
tool and POUpdate
builder.
MSGMERGECOMSTR
String to be displayed when msgmerge(1) is invoked
(default: ''
, which means ``print $MSGMERGECOM
'').
See msgmerge
tool and POUpdate
builder.
MSGMERGEFLAGS
Additional flags to msgmerge(1) command.
See msgmerge
tool and POUpdate
builder.
MSSDK_DIR
The directory containing the Microsoft SDK (either Platform SDK or Windows SDK) to be used for compilation.
MSSDK_VERSION
The version string of the Microsoft SDK
(either Platform SDK or Windows SDK)
to be used for compilation.
Supported versions include
6.1
,
6.0A
,
6.0
,
2003R2
and
2003R1
.
MSVC_BATCH
When set to any true value,
specifies that SCons should batch
compilation of object files
when calling the Microsoft Visual C++ compiler.
All compilations of source files from the same source directory
that generate target files in a same output directory
and were configured in SCons using the same construction environment
will be built in a single call to the compiler.
Only source files that have changed since their
object files were built will be passed to each compiler invocation
(via the $CHANGED_SOURCES
construction variable).
Any compilations where the object (target) file base name
(minus the .obj
)
does not match the source file base name
will be compiled separately.
MSVC_NOTFOUND_POLICY
Specify the scons behavior when the Microsoft Visual C++ compiler is not detected.
The $MSVC_NOTFOUND_POLICY
specifies the scons behavior when no msvc versions are detected or
when the requested msvc version is not detected.
The valid values for $MSVC_NOTFOUND_POLICY
and the corresponding scons behavior are:
'Error' or 'Exception'
Raise an exception when no msvc versions are detected or when the requested msvc version is not detected.
'Warning' or 'Warn'
Issue a warning and continue when no msvc versions are detected or when the requested msvc version is not detected. Depending on usage, this could result in build failure(s).
'Ignore' or 'Suppress'
Take no action and continue when no msvc versions are detected or when the requested msvc version is not detected. Depending on usage, this could result in build failure(s).
Note: in addition to the camel case values shown above, lower case and upper case values are accepted as well.
The $MSVC_NOTFOUND_POLICY
is applied when any of the following conditions are satisfied:
$MSVC_VERSION
is specified, the default tools list is implicitly defined (i.e., the tools list is not specified),
and the default tools list contains one or more of the msvc tools.
$MSVC_VERSION
is specified, the default tools list is explicitly specified (e.g., tools=['default']
),
and the default tools list contains one or more of the msvc tools.
A non-default tools list is specified that contains one or more of the msvc tools (e.g., tools=['msvc', 'mslink']
).
The $MSVC_NOTFOUND_POLICY
is ignored when any of the following conditions are satisfied:
$MSVC_VERSION
is not specified and the default tools list is implicitly defined (i.e., the tools list is not specified).
$MSVC_VERSION
is not specified and the default tools list is explicitly specified (e.g., tools=['default']
).
A non-default tool list is specified that does not contain any of the msvc tools (e.g., tools=['mingw']
).
Important usage details:
$MSVC_NOTFOUND_POLICY
must be passed as an argument to the Environment
constructor when an msvc tool (e.g., msvc
, msvs
, etc.) is
loaded via the default tools list or via a tools list passed to the
Environment
constructor.
Otherwise, $MSVC_NOTFOUND_POLICY
must be set before the first msvc tool is
loaded into the environment.
When $MSVC_NOTFOUND_POLICY
is not specified, the default scons behavior is to issue a warning and continue
subject to the conditions listed above. The default scons behavior may change in the future.
New in version 4.4
MSVC_SCRIPT_ARGS
Pass user-defined arguments to the Microsoft Visual C++ batch file determined via autodetection.
$MSVC_SCRIPT_ARGS
is available for msvc batch file arguments that do not have first-class support
via construction variables or when there is an issue with the appropriate construction variable validation.
When available, it is recommended to use the appropriate construction variables (e.g., $MSVC_TOOLSET_VERSION
)
rather than $MSVC_SCRIPT_ARGS
arguments.
The valid values for $MSVC_SCRIPT_ARGS
are: None
, a string,
or a list of strings.
The $MSVC_SCRIPT_ARGS
value is converted to a scalar string (i.e., "flattened").
The resulting scalar string, if not empty, is passed as an argument to the msvc batch file determined
via autodetection subject to the validation conditions listed below.
$MSVC_SCRIPT_ARGS
is ignored when the value is None
and when the
result from argument conversion is an empty string. The validation conditions below do not apply.
An exception is raised when any of the following conditions are satisfied:
$MSVC_SCRIPT_ARGS
is specified for Visual Studio 2013 and earlier.
Multiple SDK version arguments (e.g., '10.0.20348.0'
) are specified
in $MSVC_SCRIPT_ARGS
.
$MSVC_SDK_VERSION
is specified and an SDK version argument
(e.g., '10.0.20348.0'
) is specified in $MSVC_SCRIPT_ARGS
.
Multiple SDK version declarations via $MSVC_SDK_VERSION
and $MSVC_SCRIPT_ARGS
are not allowed.
Multiple toolset version arguments (e.g., '-vcvars_ver=14.29'
)
are specified in $MSVC_SCRIPT_ARGS
.
$MSVC_TOOLSET_VERSION
is specified and a toolset version argument
(e.g., '-vcvars_ver=14.29'
) is specified in $MSVC_SCRIPT_ARGS
.
Multiple toolset version declarations via $MSVC_TOOLSET_VERSION
and
$MSVC_SCRIPT_ARGS
are not allowed.
Multiple spectre library arguments (e.g., '-vcvars_spectre_libs=spectre'
)
are specified in $MSVC_SCRIPT_ARGS
.
$MSVC_SPECTRE_LIBS
is enabled and a spectre library argument
(e.g., '-vcvars_spectre_libs=spectre'
) is specified in
$MSVC_SCRIPT_ARGS
. Multiple spectre library declarations via $MSVC_SPECTRE_LIBS
and $MSVC_SCRIPT_ARGS
are not allowed.
Multiple UWP arguments (e.g., uwp
or store
) are specified
in $MSVC_SCRIPT_ARGS
.
$MSVC_UWP_APP
is enabled and a UWP argument (e.g., uwp
or
store
) is specified in $MSVC_SCRIPT_ARGS
. Multiple UWP declarations
via $MSVC_UWP_APP
and $MSVC_SCRIPT_ARGS
are not allowed.
Example 1 - A Visual Studio 2022 build with an SDK version and a toolset version specified with a string argument:
env = Environment(MSVC_VERSION='14.3', MSVC_SCRIPT_ARGS='10.0.20348.0 -vcvars_ver=14.29.30133')
Example 2 - A Visual Studio 2022 build with an SDK version and a toolset version specified with a list argument:
env = Environment(MSVC_VERSION='14.3', MSVC_SCRIPT_ARGS=['10.0.20348.0', '-vcvars_ver=14.29.30133'])
Important usage details:
$MSVC_SCRIPT_ARGS
must be passed as an argument to the Environment
constructor when an msvc tool (e.g., msvc
, msvs
, etc.) is
loaded via the default tools list or via a tools list passed to the
Environment
constructor.
Otherwise, $MSVC_SCRIPT_ARGS
must be set before the first msvc tool is
loaded into the environment.
Other than checking for multiple declarations as described above, $MSVC_SCRIPT_ARGS
arguments
are not validated.
Erroneous, inconsistent, and/or version incompatible $MSVC_SCRIPT_ARGS
arguments are likely
to result in build failures for reasons that are not readily apparent and may be difficult to diagnose.
The burden is on the user to ensure that the arguments provided to the msvc batch file are valid, consistent
and compatible with the version of msvc selected.
New in version 4.4
MSVC_SCRIPTERROR_POLICY
Specify the scons behavior when Microsoft Visual C++ batch file errors are detected.
The $MSVC_SCRIPTERROR_POLICY
specifies the scons behavior when msvc batch file errors are
detected.
When $MSVC_SCRIPTERROR_POLICY
is not specified, the default scons behavior is to suppress
msvc batch file error messages.
The root cause of msvc build failures may be difficult to diagnose. In these situations, setting the scons behavior to issue a warning when msvc batch file errors are detected may produce additional diagnostic information.
The valid values for $MSVC_SCRIPTERROR_POLICY
and the corresponding scons behavior are:
'Error' or 'Exception'
Raise an exception when msvc batch file errors are detected.
'Warning' or 'Warn'
Issue a warning when msvc batch file errors are detected.
'Ignore' or 'Suppress'
Suppress msvc batch file error messages.
New in version 4.4
Note: in addition to the camel case values shown above, lower case and upper case values are accepted as well.
Example 1 - A Visual Studio 2022 build with user-defined script arguments:
env = environment(MSVC_VERSION='14.3', MSVC_SCRIPT_ARGS=['8.1', 'store', '-vcvars_ver=14.1']) env.Program('hello', ['hello.c'], CCFLAGS='/MD', LIBS=['kernel32', 'user32', 'runtimeobject'])
Example 1 - Output fragment:
... link /nologo /OUT:_build001\hello.exe kernel32.lib user32.lib runtimeobject.lib _build001\hello.obj LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib' ...
Example 2 - A Visual Studio 2022 build with user-defined script arguments and the script error policy set to issue a warning when msvc batch file errors are detected:
env = environment(MSVC_VERSION='14.3', MSVC_SCRIPT_ARGS=['8.1', 'store', '-vcvars_ver=14.1'], MSVC_SCRIPTERROR_POLICY='warn') env.Program('hello', ['hello.c'], CCFLAGS='/MD', LIBS=['kernel32', 'user32', 'runtimeobject'])
Example 2 - Output fragment:
... scons: warning: vc script errors detected: [ERROR:vcvars.bat] The UWP Application Platform requires a Windows 10 SDK. [ERROR:vcvars.bat] WindowsSdkDir = "C:\Program Files (x86)\Windows Kits\8.1\" [ERROR:vcvars.bat] host/target architecture is not supported : { x64 , x64 } ... link /nologo /OUT:_build001\hello.exe kernel32.lib user32.lib runtimeobject.lib _build001\hello.obj LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
Important usage details:
$MSVC_SCRIPTERROR_POLICY
must be passed as an argument to the Environment
constructor when an msvc tool (e.g., msvc
, msvs
, etc.) is
loaded via the default tools list or via a tools list passed to the
Environment
constructor.
Otherwise, $MSVC_SCRIPTERROR_POLICY
must be set before the first msvc tool is
loaded into the environment.
Due to scons implementation details, not all Windows system environment variables are propagated
to the environment in which the msvc batch file is executed. Depending on Visual Studio version
and installation options, non-fatal msvc batch file error messages may be generated for ancillary
tools which may not affect builds with the msvc compiler. For this reason, caution is recommended
when setting the script error policy to raise an exception (e.g., 'Error'
).
New in version 4.4
MSVC_SDK_VERSION
Build with a specific version of the Microsoft Software Development Kit (SDK).
The valid values for $MSVC_SDK_VERSION
are: None
or a string containing the requested SDK version (e.g., '10.0.20348.0'
).
$MSVC_SDK_VERSION
is ignored when the value is None
and when
the value is an empty string. The validation conditions below do not apply.
An exception is raised when any of the following conditions are satisfied:
$MSVC_SDK_VERSION
is specified for Visual Studio 2013 and earlier.
$MSVC_SDK_VERSION
is specified and an SDK version argument is specified in
$MSVC_SCRIPT_ARGS
. Multiple SDK version declarations via $MSVC_SDK_VERSION
and $MSVC_SCRIPT_ARGS
are not allowed.
The $MSVC_SDK_VERSION
specified does not match any of the supported formats:
'10.0.XXXXX.Y'
[SDK 10.0]
'8.1'
[SDK 8.1]
The system folder for the corresponding $MSVC_SDK_VERSION
version is not found.
The requested SDK version does not appear to be installed.
The $MSVC_SDK_VERSION
version does not appear to support the requested platform
type (i.e., UWP
or Desktop
). The requested SDK version
platform type components do not appear to be installed.
The $MSVC_SDK_VERSION
version is 8.1
, the platform type is
UWP
, and the build tools selected are from Visual Studio 2017
and later (i.e., $MSVC_VERSION
must be '14.0' or $MSVC_TOOLSET_VERSION
must be '14.0').
Example 1 - A Visual Studio 2022 build with a specific Windows SDK version:
env = Environment(MSVC_VERSION='14.3', MSVC_SDK_VERSION='10.0.20348.0')
Example 2 - A Visual Studio 2022 build with a specific SDK version for the Universal Windows Platform:
env = Environment(MSVC_VERSION='14.3', MSVC_SDK_VERSION='10.0.20348.0', MSVC_UWP_APP=True)
Important usage details:
$MSVC_SDK_VERSION
must be passed as an argument to the Environment
constructor when an msvc tool (e.g., msvc
, msvs
, etc.) is
loaded via the default tools list or via a tools list passed to the
Environment
constructor.
Otherwise, $MSVC_SDK_VERSION
must be set before the first msvc tool is
loaded into the environment.
Should a SDK 10.0 version be installed that does not follow the naming scheme above, the
SDK version will need to be specified via $MSVC_SCRIPT_ARGS
until the version number
validation format can be extended.
Should an exception be raised indicating that the SDK version is not found, verify that the requested SDK version is installed with the necessary platform type components.
There is a known issue with the Microsoft libraries when the target architecture is
ARM64
and a Windows 11 SDK (version '10.0.22000.0'
and later) is used
with the v141
build tools and older v142
toolsets
(versions '14.28.29333'
and earlier). Should build failures arise with these combinations
of settings due to unresolved symbols in the Microsoft libraries, $MSVC_SDK_VERSION
may be employed to
specify a Windows 10 SDK (e.g., '10.0.20348.0'
) for the build.
New in version 4.4
MSVC_SPECTRE_LIBS
Build with the spectre-mitigated Microsoft Visual C++ libraries.
The valid values for $MSVC_SPECTRE_LIBS
are: True
,
False
, or None
.
When $MSVC_SPECTRE_LIBS
is enabled (i.e., True
),
the Microsoft Visual C++ environment will include the paths to the spectre-mitigated implementations
of the Microsoft Visual C++ libraries.
An exception is raised when any of the following conditions are satisfied:
$MSVC_SPECTRE_LIBS
is enabled for Visual Studio 2015 and earlier.
$MSVC_SPECTRE_LIBS
is enabled and a spectre library argument is specified in
$MSVC_SCRIPT_ARGS
. Multiple spectre library declarations via $MSVC_SPECTRE_LIBS
and $MSVC_SCRIPT_ARGS
are not allowed.
$MSVC_SPECTRE_LIBS
is enabled and the platform type is UWP
. There
are no spectre-mitigated libraries for Universal Windows Platform (UWP) applications or
components.
Example - A Visual Studio 2022 build with spectre mitigated Microsoft Visual C++ libraries:
env = Environment(MSVC_VERSION='14.3', MSVC_SPECTRE_LIBS=True)
Important usage details:
$MSVC_SPECTRE_LIBS
must be passed as an argument to the Environment
constructor when an msvc tool (e.g., msvc
, msvs
, etc.) is
loaded via the default tools list or via a tools list passed to the
Environment
constructor.
Otherwise, $MSVC_SPECTRE_LIBS
must be set before the first msvc tool is
loaded into the environment.
Additional compiler switches (e.g., /Qspectre
) are necessary for including
spectre mitigations when building user artifacts. Refer to the Visual Studio documentation for
details.
The existence of the spectre libraries host architecture and target architecture folders are not
verified when $MSVC_SPECTRE_LIBS
is enabled which could result in build failures.
The burden is on the user to ensure the requisite libraries with spectre mitigations are installed.
New in version 4.4
MSVC_TOOLSET_VERSION
Build with a specific Microsoft Visual C++ toolset version.
Specifying $MSVC_TOOLSET_VERSION
does not affect the autodetection and selection
of msvc instances. The $MSVC_TOOLSET_VERSION
is applied after
an msvc instance is selected. This could be the default version of msvc if $MSVC_VERSION
is not specified.
The valid values for $MSVC_TOOLSET_VERSION
are: None
or a string containing the requested toolset version (e.g., '14.29'
).
$MSVC_TOOLSET_VERSION
is ignored when the value is None
and when
the value is an empty string. The validation conditions below do not apply.
An exception is raised when any of the following conditions are satisfied:
$MSVC_TOOLSET_VERSION
is specified for Visual Studio 2015 and earlier.
$MSVC_TOOLSET_VERSION
is specified and a toolset version argument is specified in
$MSVC_SCRIPT_ARGS
. Multiple toolset version declarations via $MSVC_TOOLSET_VERSION
and $MSVC_SCRIPT_ARGS
are not allowed.
The $MSVC_TOOLSET_VERSION
specified does not match any of the supported formats:
'XX.Y'
'XX.YY'
'XX.YY.ZZZZZ'
'XX.YY.Z'
to 'XX.YY.ZZZZ'
[scons extension not directly supported by the msvc batch files and may be removed in the future]
'XX.YY.ZZ.N'
[SxS format]
'XX.YY.ZZ.NN'
[SxS format]
The major msvc version prefix (i.e., 'XX.Y'
) of the $MSVC_TOOLSET_VERSION
specified
is for Visual Studio 2013 and earlier (e.g., '12.0'
).
The major msvc version prefix (i.e., 'XX.Y'
) of the $MSVC_TOOLSET_VERSION
specified
is greater than the msvc version selected (e.g., '99.0'
).
A system folder for the corresponding $MSVC_TOOLSET_VERSION
version is not found.
The requested toolset version does not appear to be installed.
Toolset selection details:
When $MSVC_TOOLSET_VERSION
is not an SxS version number or a full toolset version number:
the first toolset version, ranked in descending order, that matches the $MSVC_TOOLSET_VERSION
prefix is selected.
When $MSVC_TOOLSET_VERSION
is specified using the major msvc version prefix
(i.e., 'XX.Y'
) and the major msvc version is that of the latest release of
Visual Studio, the selected toolset version may not be the same as the default Microsoft Visual C++ toolset version.
In the latest release of Visual Studio, the default Microsoft Visual C++ toolset version is not necessarily the toolset with the largest version number.
Example 1 - A default Visual Studio build with a partial toolset version specified:
env = Environment(MSVC_TOOLSET_VERSION='14.2')
Example 2 - A default Visual Studio build with a partial toolset version specified:
env = Environment(MSVC_TOOLSET_VERSION='14.29')
Example 3 - A Visual Studio 2022 build with a full toolset version specified:
env = Environment(MSVC_VERSION='14.3', MSVC_TOOLSET_VERSION='14.29.30133')
Example 4 - A Visual Studio 2022 build with an SxS toolset version specified:
env = Environment(MSVC_VERSION='14.3', MSVC_TOOLSET_VERSION='14.29.16.11')
Important usage details:
$MSVC_TOOLSET_VERSION
must be passed as an argument to the Environment
constructor when an msvc tool (e.g., msvc
, msvs
, etc.) is
loaded via the default tools list or via a tools list passed to the
Environment
constructor.
Otherwise, $MSVC_TOOLSET_VERSION
must be set before the first msvc tool is
loaded into the environment.
The existence of the toolset host architecture and target architecture folders are not verified
when $MSVC_TOOLSET_VERSION
is specified which could result in build failures.
The burden is on the user to ensure the requisite toolset target architecture build tools are installed.
New in version 4.4
MSVC_USE_SCRIPT
Use a batch script to set up the Microsoft Visual C++ compiler.
If set to the name of a Visual Studio .bat
file
(e.g. vcvars.bat
),
SCons will run that batch file instead of the auto-detected one,
and extract the relevant variables from the result (typically
%INCLUDE%
,
%LIB%
, and
%PATH%
) for supplying to the build.
This can be useful to force the use of a compiler version that
SCons does not detect.
$MSVC_USE_SCRIPT_ARGS
provides arguments passed to this script.
Setting
$MSVC_USE_SCRIPT
to None
bypasses the
Visual Studio autodetection entirely;
use this if you are running SCons in a Visual Studio cmd
window and importing the shell's environment variables - that
is, if you are sure everything is set correctly already and
you don't want SCons to change anything.
$MSVC_USE_SCRIPT
ignores $MSVC_VERSION
and $TARGET_ARCH
.
Changed in version 4.4:
new $MSVC_USE_SCRIPT_ARGS
provides a
way to pass arguments.
MSVC_USE_SCRIPT_ARGS
Provides arguments passed to the script $MSVC_USE_SCRIPT
.
New in version 4.4
MSVC_USE_SETTINGS
Use a dictionary to set up the Microsoft Visual C++ compiler.
$MSVC_USE_SETTINGS
is ignored when $MSVC_USE_SCRIPT
is defined
and/or when $MSVC_USE_SETTINGS
is set to None
.
The dictionary is used to populate the environment with the relevant variables
(typically %INCLUDE%
, %LIB%
, and %PATH%
)
for supplying to the build. This can be useful to force the use of a compiler environment
that SCons does not configure correctly. This is an alternative to manually configuring
the environment when bypassing Visual Studio autodetection entirely by setting
$MSVC_USE_SCRIPT
to None
.
Here is an example of configuring a build environment using the Microsoft Visual C++ compiler included in the Microsoft SDK on a 64-bit host and building for a 64-bit architecture:
# Microsoft SDK 6.0 (MSVC 8.0): 64-bit host and 64-bit target msvc_use_settings = { "PATH": [ "C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0\\VC\\Bin\\x64", "C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0\\Bin\\x64", "C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0\\Bin", "C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727", "C:\\Windows\\system32", "C:\\Windows", "C:\\Windows\\System32\\Wbem", "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\" ], "INCLUDE": [ "C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0\\VC\\Include", "C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0\\VC\\Include\\Sys", "C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0\\Include", "C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0\\Include\\gl", ], "LIB": [ "C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0\\VC\\Lib\\x64", "C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0\\Lib\\x64", ], "LIBPATH": [], "VSCMD_ARG_app_plat": [], "VCINSTALLDIR": [], "VCToolsInstallDir": [] } # Specifying MSVC_VERSION is recommended env = Environment(MSVC_VERSION='8.0', MSVC_USE_SETTINGS=msvc_use_settings)
Important usage details:
$MSVC_USE_SETTINGS
must be passed as an argument to the Environment
constructor when an msvc tool (e.g., msvc
, msvs
, etc.) is
loaded via the default tools list or via a tools list passed to the
Environment
constructor.
Otherwise, $MSVC_USE_SETTINGS
must be set before the first msvc tool is
loaded into the environment.
The dictionary content requirements are based on the internal msvc implementation and therefore may change at any time. The burden is on the user to ensure the dictionary contents are minimally sufficient to ensure successful builds.
New in version 4.4
MSVC_UWP_APP
Build with the Universal Windows Platform (UWP) application Microsoft Visual C++ libraries.
The valid values for $MSVC_UWP_APP
are: True
,
'1'
, False
, '0'
,
or None
.
When $MSVC_UWP_APP
is enabled (i.e., True
or
'1'
), the Microsoft Visual C++ environment will be set up to point
to the Windows Store compatible libraries and Microsoft Visual C++ runtimes. In doing so,
any libraries that are built will be able to be used in a UWP App and published
to the Windows Store.
An exception is raised when any of the following conditions are satisfied:
$MSVC_UWP_APP
is enabled for Visual Studio 2013 and earlier.
$MSVC_UWP_APP
is enabled and a UWP argument is specified in
$MSVC_SCRIPT_ARGS
. Multiple UWP declarations via $MSVC_UWP_APP
and $MSVC_SCRIPT_ARGS
are not allowed.
Example - A Visual Studio 2022 build for the Universal Windows Platform:
env = Environment(MSVC_VERSION='14.3', MSVC_UWP_APP=True)
Important usage details:
$MSVC_UWP_APP
must be passed as an argument to the Environment
constructor when an msvc tool (e.g., msvc
, msvs
, etc.) is
loaded via the default tools list or via a tools list passed to the
Environment
constructor.
Otherwise, $MSVC_UWP_APP
must be set before the first msvc tool is
loaded into the environment.
The existence of the UWP libraries is not verified when $MSVC_UWP_APP
is enabled
which could result in build failures.
The burden is on the user to ensure the requisite UWP libraries are installed.
MSVC_VERSION
A string to select the preferred version of Microsoft Visual C++.
If the specified version is unavailable and/or unknown to SCons,
a warning is issued showing the versions actually discovered,
and the build will eventually fail indicating a missing compiler binary.
If $MSVC_VERSION
is not set, SCons will (by default) select the
latest version of Microsoft Visual C++ installed on your system
(excluding any preview versions).
In order to take effect, $MSVC_VERSION
must be set before
the initial Microsoft Visual C++ compiler discovery takes place.
Discovery happens, at the latest, during the first call to the
Environment
function, unless a tools
list is specified which excludes the entire Microsoft Visual C++ toolchain -
that is, omits "defaults"
and any specific tool module that refers to parts of the toolchain
(msvc
, mslink
, masm
, midl
and msvs
). In this case, detection is deferred until
any one of those tool modules is invoked manually.
The following two examples illustrate this:
# MSVC_VERSION set as Environment is created env = Environment(MSVC_VERSION='14.2') # Initialization deferred with empty tools, triggered manually env = Environment(tools=[]) env['MSVC_VERSION'] = '14.2 env.Tool('msvc') env.Tool('mslink') env.Tool('msvs')
The valid values for $MSVC_VERSION
represent major versions
of the compiler, except that versions ending in Exp
refer to "Express" or "Express for Desktop" Visual Studio editions.
Values that do not look like a valid compiler version
string are not supported.
The following table shows the correspondence
of $MSVC_VERSION
values to various version indicators
('x' is used as a placeholder for
a single digit that can vary).
SCons Key |
| _MSVC_VER | Visual Studio Product |
|
---|---|---|---|---|
"14.3" | 14.3x | 193x | Visual Studio 2022 | 17.x, 17.1x |
"14.2" | 14.2x | 192x | Visual Studio 2019 | 16.x, 16.1x |
"14.1" | 14.1 or 14.1x | 191x | Visual Studio 2017 | 15.x |
"14.1Exp" | 14.1 or 14.1x | 191x | Visual Studio 2017 Express | 15.x |
"14.0" | 14.0 | 1900 | Visual Studio 2015 | 14.0 |
"14.0Exp" | 14.0 | 1900 | Visual Studio 2015 Express | 14.0 |
"12.0" | 12.0 | 1800 | Visual Studio 2013 | 12.0 |
"12.0Exp" | 12.0 | 1800 | Visual Studio 2013 Express | 12.0 |
"11.0" | 11.0 | 1700 | Visual Studio 2012 | 11.0 |
"11.0Exp" | 11.0 | 1700 | Visual Studio 2012 Express | 11.0 |
"10.0" | 10.0 | 1600 | Visual Studio 2010 | 10.0 |
"10.0Exp" | 10.0 | 1600 | Visual C++ Express 2010 | 10.0 |
"9.0" | 9.0 | 1500 | Visual Studio 2008 | 9.0 |
"9.0Exp" | 9.0 | 1500 | Visual C++ Express 2008 | 9.0 |
"8.0" | 8.0 | 1400 | Visual Studio 2005 | 8.0 |
"8.0Exp" | 8.0 | 1400 | Visual C++ Express 2005 | 8.0 |
"7.1" | 7.1 | 1300 | Visual Studio .NET 2003 | 7.1 |
"7.0" | 7.0 | 1200 | Visual Studio .NET 2002 | 7.0 |
"6.0" | 6.0 | 1100 | Visual Studio 6.0 | 6.0 |
It is not necessary to install a Visual Studio IDE
to build with SCons (for example, you can install only
Build Tools), but when a Visual Studio IDE is installed,
additional builders such as MSVSSolution
and
MSVSProject
become available and correspond to
the specified versions.
Versions ending in Exp
refer to historical
"Express" or "Express for Desktop" Visual Studio editions,
which had feature limitations compared to the full editions.
It is only necessary to specify the Exp
suffix to select the express edition when both express and
non-express editions of the same product are installed
simulaneously. The Exp
suffix is unnecessary,
but accepted, when only the express edition is installed.
The compilation environment can be further or more precisely specified through the
use of several other construction variables: see the descriptions of
$MSVC_TOOLSET_VERSION
,
$MSVC_SDK_VERSION
,
$MSVC_USE_SCRIPT
,
$MSVC_USE_SCRIPT_ARGS
,
and $MSVC_USE_SETTINGS
.
MSVS
When the Microsoft Visual Studio tools are initialized, they set up this dictionary with the following keys:
the version of MSVS being used (can be set via
$MSVC_VERSION
)
the available versions of MSVS installed
installed directory of Microsoft Visual C++
installed directory of Visual Studio
installed directory of the .NET framework
list of installed versions of the .NET framework, sorted latest to oldest.
latest installed version of the .NET framework
installed location of the .NET SDK.
installed location of the Platform SDK.
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 is not set, it was not available in the registry.
Visual Studio 2017 and later do not use the registry for
primary storage of this information, so typically for these
versions only PROJECTSUFFIX
and
SOLUTIONSUFFIX
will be set.
MSVS_ARCH
Sets the architecture for which the generated project(s) should build.
The default value is x86
.
amd64
is also supported by SCons for
most Visual Studio versions. Since Visual Studio 2015
arm
is supported, and since Visual Studio
2017 arm64
is supported.
Trying to set $MSVS_ARCH
to an architecture that's not supported for a given Visual
Studio version will generate an error.
MSVS_PROJECT_GUID
The string placed in a generated
Microsoft Visual C++ project file as the value of the
ProjectGUID
attribute. There is no default
value. If not defined, a new GUID is generated.
MSVS_SCC_AUX_PATH
The path name placed in a generated
Microsoft Visual C++ 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_CONNECTION_ROOT
The root path of projects in your SCC workspace, i.e the
path under which all project and solution files will be
generated. It is used as a reference path from which the
relative paths of the generated Microsoft Visual C++ project
and solution files are computed. The relative project file path
is placed as the value of the SccLocalPath
attribute of the project file and as the values of the
SccProjectFilePathRelativizedFromConnection[i]
(where [i] ranges from 0 to the number of projects in the solution)
attributes of the GlobalSection(SourceCodeControl)
section of the Microsoft Visual Studio solution file. Similarly
the relative solution file path is placed as the values of the
SccLocalPath[i]
(where [i] ranges from 0
to the number of projects in the solution) attributes of the
GlobalSection(SourceCodeControl)
section of
the Microsoft Visual Studio solution file. This is used only if
the MSVS_SCC_PROVIDER
construction variable is
also set. The default value is the current working directory.
MSVS_SCC_PROJECT_NAME
The project name placed in a generated Microsoft Visual C++
project file as the value of the
SccProjectName
attribute if the
MSVS_SCC_PROVIDER
construction variable
is also set. In this case the string is also placed in
the SccProjectName0
attribute of the
GlobalSection(SourceCodeControl)
section
of the Microsoft Visual Studio solution file. There is no
default value.
MSVS_SCC_PROVIDER
The string placed in a generated Microsoft Visual C++
project file as the value of the
SccProvider
attribute. The string is
also placed in the SccProvider0
attribute
of the GlobalSection(SourceCodeControl)
section of the Microsoft Visual Studio solution file. There
is no default value.
MSVS_VERSION
Set the preferred version of Microsoft Visual Studio to use.
If $MSVS_VERSION
is not set, SCons will (by default)
select the latest version of Visual Studio installed on your
system. 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 when
initializing the Environment, setting it to the appropriate
version ('6.0' or '7.0', for example). If the specified
version isn't installed, tool initialization will fail.
Deprecated since 1.3.0:
$MSVS_VERSION
is deprecated in favor of $MSVC_VERSION
.
As a transitional aid, if $MSVS_VERSION
is set
and $MSVC_VERSION
is not,
$MSVC_VERSION
will be initialized to the value
of $MSVS_VERSION
.
An error is raised if If both are set and have different values,
MSVSBUILDCOM
The build command line placed in a generated Microsoft Visual C++ project file. The default is to have Visual Studio invoke SCons with any specified build targets.
MSVSCLEANCOM
The clean command line placed in a generated Microsoft Visual C++
project file. The default is to have Visual Studio
invoke SCons with the -c
option to remove
any specified targets.
MSVSENCODING
The encoding string placed in a generated Microsoft Visual C++
project file. The default is encoding
Windows-1252
.
MSVSPROJECTCOM
The action used to generate Microsoft Visual C++ project files.
MSVSPROJECTSUFFIX
The suffix used for Microsoft Visual C++ project (DSP)
files. The default value is
.vcxproj
when using Visual Studio 2010
and later, .vcproj
when using Visual Studio versions between 2002 and 2008,
and .dsp
when using Visual Studio 6.0.
MSVSREBUILDCOM
The rebuild command line placed in a generated Microsoft Visual C++ project file. The default is to have Visual Studio invoke SCons with any specified rebuild targets.
MSVSSCONS
The SCons used in generated Microsoft Visual C++ project files. The default is the version of SCons being used to generate the project file.
MSVSSCONSCOM
The default SCons command used in generated Microsoft Visual C++ project files.
MSVSSCONSCRIPT
The sconscript file (that is, SConstruct
or SConscript
file) that will be invoked by Microsoft Visual C++ project files
(through the $MSVSSCONSCOM
variable). The default
is the same sconscript file that contains the call to
MSVSProject
to build the project file.
MSVSSCONSFLAGS
The SCons flags used in generated Microsoft Visual C++ project files.
MSVSSOLUTIONCOM
The action used to generate Microsoft Visual Studio solution files.
MSVSSOLUTIONSUFFIX
The suffix used for Microsoft Visual Studio solution (DSW)
files. The default value is .sln
when using Visual Studio version 7.x (.NET 2002) and later,
and .dsw
when using Visual Studio 6.0.
MT
The program used on Windows systems to embed manifests into DLLs and EXEs.
See also $WINDOWS_EMBED_MANIFEST
.
MTEXECOM
The Windows command line used to embed manifests into executables.
See also $MTSHLIBCOM
.
MTFLAGS
Flags passed to the $MT
manifest embedding program (Windows only).
MTSHLIBCOM
The Windows command line used to embed manifests into shared libraries (DLLs).
See also $MTEXECOM
.
MWCW_VERSION
The version number of the MetroWerks CodeWarrior C compiler to be used.
MWCW_VERSIONS
A list of installed versions of the MetroWerks CodeWarrior C compiler on this system.
NAME
Specfies the name of the project to package.
See the Package
builder.
NINJA_ALIAS_NAME
The name of the alias target which will cause SCons to create the ninja build file,
and then (optionally) run ninja.
The default value is generate-ninja
.
NINJA_CMD_ARGS
A string which will pass arguments through SCons to the ninja command when scons executes ninja.
Has no effect if $NINJA_DISABLE_AUTO_RUN
is set.
This value can also be passed on the command line:
scons NINJA_CMD_ARGS=-v or scons NINJA_CMD_ARGS="-v -j 3"
NINJA_COMPDB_EXPAND
Boolean value to instruct ninja to expand the command line arguments normally put into
response files.
If true, prevents unexpanded lines in the compilation database like
“gcc @rsp_file
” and instead yields expanded lines like
“gcc -c -o myfile.o myfile.c -Ia -DXYZ
”.
Ninja's compdb tool added the -x
flag in Ninja V1.9.0
NINJA_DEPFILE_PARSE_FORMAT
Determines the type of format ninja should expect when parsing header
include depfiles. Can be msvc
, gcc
, or clang
.
The msvc
option corresponds to /showIncludes
format, and
gcc
or clang
correspond to -MMD -MF
.
NINJA_DIR
The builddir
value.
Propagates directly into the generated ninja build file.
From Ninja's docs:
“
A directory for some Ninja output files. ... (You can also store other build output in this
directory.)
”
The default value is .ninja
.
NINJA_DISABLE_AUTO_RUN
Boolean. Default: False
.
If true, SCons will not run ninja automatically after creating the ninja build file.
If not explicitly set, this will be set to True
if --disable_execute_ninja
or
SetOption('disable_execute_ninja', True)
is seen.
NINJA_ENV_VAR_CACHE
A string that sets the environment for any environment variables that differ between the OS environment and the SCons execution environment.
It will be compatible with the default shell of the operating system.
If not explicitly set, SCons will generate this dynamically from the
execution environment stored in the current construction environment
(e.g. env['ENV']
)
where those values differ from the existing shell..
NINJA_FILE_NAME
The filename for the generated Ninja build file.
The default is ninja.build
.
NINJA_FORCE_SCONS_BUILD
If true, causes the build nodes to callback to scons instead of using ninja to build them. This is intended to be passed to the environment on the builder invocation. It is useful if you have a build node which does something which is not easily translated into ninja.
NINJA_GENERATED_SOURCE_ALIAS_NAME
A string matching the name of a user defined alias which represents a list of all generated sources.
This will prevent the auto-detection of generated sources from $NINJA_GENERATED_SOURCE_SUFFIXES
.
Then all other source files will be made to depend on this in the ninja build file, forcing the
generated sources to be built first.
NINJA_GENERATED_SOURCE_SUFFIXES
The list of source file suffixes which are generated by SCons build steps. All source files which match these suffixes will be added to the _generated_sources alias in the output ninja build file. Then all other source files will be made to depend on this in the ninja build file, forcing the generated sources to be built first.
NINJA_MSVC_DEPS_PREFIX
The msvc_deps_prefix
string.
Propagates directly into the generated ninja build file.
From Ninja's docs:
“defines the string which should be stripped from msvc's /showIncludes
output”
NINJA_POOL
Set the ninja_pool
for this or all targets in scope for this env var.
NINJA_REGENERATE_DEPS
A generator function used to create a ninja depfile which includes all the files which would require SCons to be invoked if they change. Or a list of said files.
_NINJA_REGENERATE_DEPS_FUNC
Internal value used to specify the function to call with argument env to generate the list of files which if changed would require the ninja build file to be regenerated.
NINJA_SCONS_DAEMON_KEEP_ALIVE
The number of seconds for the SCons deamon launched by ninja to stay alive. (Default: 180000)
NINJA_SCONS_DAEMON_PORT
The TCP/IP port for the SCons daemon to listen on. NOTE: You cannot use a port already being listened to on your build machine. (Default: random number between 10000,60000)
NINJA_SYNTAX
The path to a custom ninja_syntax.py
file which is used in generation.
The tool currently assumes you have ninja installed as a Python module and grabs the syntax file from that
installation if $NINJA_SYNTAX
is not explicitly set.
no_import_lib
When 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.
OBJPREFIX
The prefix used for (static) object file names.
OBJSUFFIX
The suffix used for (static) object file names.
PACKAGEROOT
Specifies the directory where all files in resulting archive will be
placed if applicable. The default value is “$NAME
-$VERSION
”.
See the Package
builder.
PACKAGETYPE
Selects the package type to build when using the Package
builder. May be a string or list of strings. See the docuentation
for the builder for the currently supported types.
$PACKAGETYPE
may be overridden with the --package-type
command line option.
See the Package
builder.
PACKAGEVERSION
The 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.
See the Package
builder.
PCH
A node for the 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. Examples:
env['PCH'] = File('StdAfx.pch') env['PCH'] = env.PCH('pch.cc')[0]
PCHCOM
The command line used by the
PCH
builder to generated a precompiled header.
PCHCOMSTR
The string displayed when generating a precompiled header.
If 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.
PCHSTOP
This 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'
PDB
The 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 Microsoft 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.
PDFLATEX
The pdflatex utility.
PDFLATEXCOM
The 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")
PDFLATEXFLAGS
General options passed to the pdflatex utility.
PDFPREFIX
The prefix used for PDF file names.
PDFSUFFIX
The suffix used for PDF file names.
PDFTEX
The pdftex utility.
PDFTEXCOM
The 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")
PDFTEXFLAGS
General 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
.
PLATFORM
The name of the platform used to create this construction environment.
SCons sets this when initializing the platform,
which by default is auto-detected
(see the platform
argument to Environment
).
env = Environment(tools=[]) if env['PLATFORM'] == 'cygwin': Tool('mingw')(env) else: Tool('msvc')(env)
POAUTOINIT
The $POAUTOINIT
variable, if set to True
(on non-zero
numeric value), let the msginit
tool to automatically initialize
missing PO
files with
msginit(1). This applies to both,
POInit
and POUpdate
builders (and others that use any of
them).
POCREATE_ALIAS
Common alias for all PO
files created with POInit
builder (default: 'po-create'
).
See msginit
tool and POInit
builder.
POSUFFIX
Suffix used for PO
files (default: '.po'
)
See msginit
tool and POInit
builder.
POTDOMAIN
The $POTDOMAIN
defines default domain, used to generate
POT
filename as
when
no $POTDOMAIN
.potPOT
file name is provided by the user. This applies to
POTUpdate
, POInit
and POUpdate
builders (and
builders, that use them, e.g. Translate
). Normally (if $POTDOMAIN
is
not defined), the builders use messages.pot
as default
POT
file name.
POTSUFFIX
Suffix used for PO Template files (default: '.pot'
).
See xgettext
tool and POTUpdate
builder.
POTUPDATE_ALIAS
Name of the common phony target for all PO Templates created with
POUpdate
(default: 'pot-update'
).
See xgettext
tool and POTUpdate
builder.
POUPDATE_ALIAS
Common alias for all PO
files being defined with
POUpdate
builder (default: 'po-update'
).
See msgmerge
tool and POUpdate
builder.
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 must accept four arguments:
s
,
target
,
source
and
env
.
s
is a string showing the command being executed,
target
,
is the target being built (file node, list, or string name(s)),
source
,
is the source(s) used (file node, list, or string name(s)),
and env
is 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 to just print the string, as in:
def print_cmd_line(s, target, source, env): sys.stdout.write(s + "\n")
Here is 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', 'bar.c'])
This prints:
... scons: Building targets ... Building bar.c -> bar.o... Building foo.c -> foo.o... Building foo.o and bar.o -> foo... scons: done building targets.
Another example could be a function that logs the actual commands to a file.
PROGEMITTER
Contains the emitter specification for the
Program
builder.
The manpage section "Builder Objects" contains
general information on specifying emitters.
PROGPREFIX
The prefix used for executable file names.
PROGSUFFIX
The suffix used for executable file names.
PSCOM
The 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.
PSPREFIX
The prefix used for PostScript file names.
PSSUFFIX
The prefix used for PostScript file names.
QT3_AUTOSCAN
Turn off scanning for mocable files. Use the Moc
Builder to explicitly
specify files to run moc on.
Changed in 4.5.0: renamed from QT_AUTOSCAN.
QT3_BINPATH
The path where the Qt binaries are installed.
The default value is '$QT3DIR
/bin
'.
Changed in 4.5.0: renamed from QT_BINPATH.
QT3_CPPPATH
The path where the Qt header files are installed.
The default value is '$QT3DIR
/include'.
Note: If you set this variable to None
,
the tool won't change the $CPPPATH
construction variable.
Changed in 4.5.0: renamed from QT_CPPPATH.
QT3_DEBUG
Prints lots of debugging information while scanning for moc files.
Changed in 4.5.0: renamed from QT_DEBUG.
QT3_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.
Changed in 4.5.0: renamed from QT_LIB.
QT3_LIBPATH
The path where the Qt libraries are installed.
The default value is '$QT3DIR
/lib
'.
Note: If you set this variable to None
,
the tool won't change the $LIBPATH
construction variable.
Changed in 4.5.0: renamed from QT_LIBPATH.
QT3_MOC
Default value is '$QT3_BINPATH
/moc
'.
QT3_MOCCXXPREFIX
Default value is ''
.
Prefix for moc output files when source is a C++ file.
QT3_MOCCXXSUFFIX
Default value is '.moc'
.
Suffix for moc output files when source is a C++ file.
Changed in 4.5.0: renamed from QT_MOCCXXSUFFIX.
QT3_MOCFROMCXXCOM
Command to generate a moc file from a C++ file.
Changed in 4.5.0: renamed from QT_MOCFROMCXXCOM.
QT3_MOCFROMCXXCOMSTR
The string displayed when generating a moc file from a C++ file.
If this is not set, then $QT3_MOCFROMCXXCOM
(the command line) is displayed.
Changed in 4.5.0: renamed from QT_MOCFROMCXXCOMSTR.
QT3_MOCFROMCXXFLAGS
Default value is '-i'
.
These flags are passed to moc when moccing a C++ file.
Changed in 4.5.0: renamed from QT_MOCFROMCXXFLAGS.
QT3_MOCFROMHCOM
Command to generate a moc file from a header.
Changed in 4.5.0: renamed from QT_MOCFROMSHCOM.
QT3_MOCFROMHCOMSTR
The string displayed when generating a moc file from a C++ file.
If this is not set, then $QT3_MOCFROMHCOM
(the command line) is displayed.
Changed in 4.5.0: renamed from QT_MOCFROMSHCOMSTR.
QT3_MOCFROMHFLAGS
Default value is ''
. These flags are passed to moc
when moccing a header file.
Changed in 4.5.0: renamed from QT_MOCFROMSHFLAGS.
QT3_MOCHPREFIX
Default value is 'moc_'
.
Prefix for moc output files when source is a header.
Changed in 4.5.0: renamed from QT_MOCHPREFIX.
QT3_MOCHSUFFIX
Default value is '$CXXFILESUFFIX
'.
Suffix for moc output files when source is a header.
Changed in 4.5.0: renamed from QT_MOCHSUFFIX.
QT3_UIC
Default value is '$QT3_BINPATH
/uic
'.
Changed in 4.5.0: renamed from QT_UIC.
QT3_UICCOM
Command to generate header files from .ui
files.
Changed in 4.5.0: renamed from QT_UICCOM.
QT3_UICCOMSTR
The string displayed when generating header files from .ui
files.
If this is not set, then $QT3_UICCOM
(the command line) is displayed.
Changed in 4.5.0: renamed from QT_UICCOMSTR.
QT3_UICDECLFLAGS
Default value is ''. These flags are passed to uic
when creating a header file from a .ui
file.
Changed in 4.5.0: renamed from QT_UICDECLFLAGS.
QT3_UICDECLPREFIX
Default value is ''
.
Prefix for uic generated header files.
Changed in 4.5.0: renamed from QT_UICDECLPREFIX.
QT3_UICDECLSUFFIX
Default value is '.h'
.
Suffix for uic generated header files.
Changed in 4.5.0: renamed from QT_UICDECLSUFFIX.
QT3_UICIMPLFLAGS
Default value is ''
.
These flags are passed to uic when creating a C++
file from a .ui
file.
Changed in 4.5.0: renamed from QT_UICIMPFLAGS.
QT3_UICIMPLPREFIX
Default value is 'uic_'
.
Prefix for uic generated implementation files.
Changed in 4.5.0: renamed from QT_UICIMPLPREFIX.
QT3_UICIMPLSUFFIX
Default value is '$CXXFILESUFFIX
'. Suffix for uic generated implementation
files.
Changed in 4.5.0: renamed from QT_UICIMPLSUFFIX.
QT3_UISUFFIX
Default value is '.ui'
.
Suffix of designer input files.
Changed in 4.5.0: renamed from QT_UISUFFIX.
QT3DIR
The path to the Qt installation to build against.
If not already set,
qt3
tool tries to obtain this from
os.environ
;
if not found there, it tries to make a guess.
Changed in 4.5.0: renamed from QTDIR.
RANLIB
The archive indexer.
RANLIBCOM
The 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")
RANLIBFLAGS
General options passed to the archive indexer.
RC
The resource compiler used to build a Microsoft Visual C++ resource file.
RCCOM
The 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.
RCFLAGS
The 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 respectively prepending and 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 prepended 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.
RDirs
A 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=True
.
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=True
.
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.
RMIC
The 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
construction variable
are included on this command line.
RMICCOMSTR
The string displayed when compiling
stub and skeleton class files
from Java classes that contain RMI implementations.
If this is not set, then $RMICCOM
(the command line) is displayed.
env = Environment( RMICCOMSTR="Generating stub/skeleton class files $TARGETS from $SOURCES" )
RMICFLAGS
General options passed to the Java RMI stub compiler.
RPATH
A list of paths to search for shared libraries when running programs. Currently only used in the GNU (gnulink), IRIX (sgilink) and Sun (sunlink) linkers. Ignored on platforms and toolchains that don't support it. Note that the paths added to RPATH are not transformed by scons in any way: if you want an absolute path, you must make it absolute yourself.
_RPATH
An automatically-generated construction variable
containing the rpath flags to be used when linking
a program with shared libraries.
The value of $_RPATH
is created
by respectively prepending $RPATHPREFIX
and appending $RPATHSUFFIX
to the beginning and end
of each directory in $RPATH
.
RPATHPREFIX
The prefix used to specify a directory to be searched for
shared libraries when running programs.
This will be prepended to the beginning of each directory
in the $RPATH
construction variable
when the $_RPATH
variable is automatically generated.
RPATHSUFFIX
The suffix used to specify a directory to be searched for
shared libraries when running programs.
This will be appended to the end of each directory
in the $RPATH
construction variable
when the $_RPATH
variable is automatically generated.
RPCGEN
The RPC protocol compiler.
RPCGENCLIENTFLAGS
Options passed to the RPC protocol compiler
when generating client side stubs.
These are in addition to any flags specified in the
$RPCGENFLAGS
construction variable.
RPCGENFLAGS
General options passed to the RPC protocol compiler.
RPCGENHEADERFLAGS
Options passed to the RPC protocol compiler
when generating a header file.
These are in addition to any flags specified in the
$RPCGENFLAGS
construction variable.
RPCGENSERVICEFLAGS
Options passed to the RPC protocol compiler
when generating server side stubs.
These are in addition to any flags specified in the
$RPCGENFLAGS
construction variable.
RPCGENXDRFLAGS
Options passed to the RPC protocol compiler
when generating XDR routines.
These are in addition to any flags specified in the
$RPCGENFLAGS
construction variable.
SCANNERS
A list of the available implicit dependency scanners. New file scanners may be added by appending to this list, although the more flexible approach is to associate scanners with a specific Builder. See the manpage sections "Builder Objects" and "Scanner Objects" for more information.
SCONS_HOME
The (optional) path to the SCons library directory,
initialized from the external environment. If set, this is
used to construct a shorter and more efficient search path in
the $MSVSSCONS
command line executed from C++
project files.
SHCC
The C compiler used for generating shared-library objects.
See also $CC
for compiling to static objects.
SHCCCOM
The command line used to compile a C source file
to a shared-library object file.
Any options specified in the $SHCFLAGS
,
$SHCCFLAGS
and
$CPPFLAGS
construction variables
are included on this command line.
See also $CCCOM
for compiling to static objects.
SHCCCOMSTR
If set, the string displayed when a C source file
is compiled to a shared object file.
If not set, then $SHCCCOM
(the command line) is displayed.
See also $CCCOMSTR
for compiling to static objects.
env = Environment(SHCCCOMSTR = "Compiling shared object $TARGET")
SHCCFLAGS
Options that are passed to the C and C++ compilers
to generate shared-library objects.
See also $CCFLAGS
for compiling to static objects.
SHCFLAGS
Options that are passed to the C compiler (only; not C++)
to generate shared-library objects.
See also $CFLAGS
for compiling to static objects.
SHCXX
The C++ compiler used for generating shared-library objects.
See also $CXX
for compiling to static objects.
SHCXXCOM
The command line used to compile a C++ source file
to a shared-library object file.
Any options specified in the $SHCXXFLAGS
and
$CPPFLAGS
construction variables
are included on this command line.
See also $CXXCOM
for compiling to static objects.
SHCXXCOMSTR
If set, the string displayed when a C++ source file
is compiled to a shared object file.
If not set, then $SHCXXCOM
(the command line) is displayed.
See also $CXXCOMSTR
for compiling to static objects.
env = Environment(SHCXXCOMSTR = "Compiling shared object $TARGET")
SHCXXFLAGS
Options that are passed to the C++ compiler
to generate shared-library objects.
See also $CXXFLAGS
for compiling to static objects.
SHDC
The name of the compiler to use when compiling D source
destined to be in a shared objects.
See also $DC
for compiling to static objects.
SHDCOM
The command line to use when compiling code to be part of shared objects.
See also $DCOM
for compiling to static objects.
SHDCOMSTR
If set, the string displayed when a D source file
is compiled to a (shared) object file.
If not set, then $SHDCOM
(the command line) is displayed.
See also $DCOMSTR
for compiling to static objects.
SHDLIBVERSIONFLAGS
Extra flags added to $SHDLINKCOM
when building versioned
SharedLibrary
. These flags are only used when $SHLIBVERSION
is
set.
SHDLINK
The linker to use when creating shared objects for code bases
include D sources.
See also $DLINK
for linking static objects.
SHDLINKCOM
The command line to use when generating shared objects.
See also $DLINKCOM
for linking static objects.
SHDLINKFLAGS
The list of flags to use when generating a shared object.
See also $DLINKFLAGS
for linking static objects.
SHELL
A string naming the shell program that will be passed to the
$SPAWN
function.
See the
$SPAWN
construction variable for more information.
SHELL_ENV_GENERATORS
A hook allowing the execution environment to be modified prior
to the actual execution of a command line from an action
via the spawner function defined by $SPAWN
.
Allows substitution based on targets and sources,
as well as values from the construction environment,
adding extra environment variables, etc.
The value must be a list (or other iterable)
of functions which each generate or
alter the execution environment dictionary.
The first function will be passed a copy of the initial execution environment
($ENV
in the current construction environment);
the dictionary returned by that function is passed to the next,
until the iterable is exhausted and the result returned
for use by the command spawner.
The original execution environment is not modified.
Each function provided in $SHELL_ENV_GENERATORS
must accept four
arguments and return a dictionary:
env
is the construction environment for this action;
target
is the list of targets associated with this action;
source
is the list of sources associated with this action;
and shell_env
is the current dictionary after iterating
any previous $SHELL_ENV_GENERATORS
functions
(this can be compared to the original execution environment,
which is available as env['ENV']
, to detect any changes).
Example:
def custom_shell_env(env, target, source, shell_env): """customize shell_env if desired""" if str(target[0]) == 'special_target': shell_env['SPECIAL_VAR'] = env.subst('SOME_VAR', target=target, source=source) return shell_env env["SHELL_ENV_GENERATORS"] = [custom_shell_env]
Available since 4.4
SHF03
The Fortran 03 compiler used for generating shared-library objects.
You should normally set the $SHFORTRAN
variable,
which specifies the default Fortran compiler
for all Fortran versions.
You only need to set $SHF03
if you need to use a specific compiler
or compiler version for Fortran 03 files.
SHF03COM
The command line used to compile a Fortran 03 source file
to a shared-library object file.
You only need to set $SHF03COM
if you need to use a specific
command line for Fortran 03 files.
You should normally set the $SHFORTRANCOM
variable,
which specifies the default command line
for all Fortran versions.
SHF03COMSTR
If set, the string displayed when a Fortran 03 source file
is compiled to a shared-library object file.
If not set, then $SHF03COM
or $SHFORTRANCOM
(the command line) is displayed.
SHF03FLAGS
Options that are passed to the Fortran 03 compiler
to generated shared-library objects.
You only need to set $SHF03FLAGS
if you need to define specific
user options for Fortran 03 files.
You should normally set the $FORTRANCOMMONFLAGS
variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
SHF03PPCOM
The command line used to compile a Fortran 03 source file to a
shared-library object file
after first running the file through the C preprocessor.
Any options specified in the $SHF03FLAGS
and $CPPFLAGS
construction variables
are included on this command line.
You only need to set $SHF03PPCOM
if you need to use a specific
C-preprocessor command line for Fortran 03 files.
You should normally set the $SHFORTRANPPCOM
variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
SHF03PPCOMSTR
If set, the string displayed when a Fortran 03 source file
is compiled to a shared-library object file
after first running the file through the C preprocessor.
If not set, then $SHF03PPCOM
or $SHFORTRANPPCOM
(the command line) is displayed.
SHF08
The Fortran 08 compiler used for generating shared-library objects.
You should normally set the $SHFORTRAN
variable,
which specifies the default Fortran compiler
for all Fortran versions.
You only need to set $SHF08
if you need to use a specific compiler
or compiler version for Fortran 08 files.
SHF08COM
The command line used to compile a Fortran 08 source file
to a shared-library object file.
You only need to set $SHF08COM
if you need to use a specific
command line for Fortran 08 files.
You should normally set the $SHFORTRANCOM
variable,
which specifies the default command line
for all Fortran versions.
SHF08COMSTR
If set, the string displayed when a Fortran 08 source file
is compiled to a shared-library object file.
If not set, then $SHF08COM
or $SHFORTRANCOM
(the command line) is displayed.
SHF08FLAGS
Options that are passed to the Fortran 08 compiler
to generated shared-library objects.
You only need to set $SHF08FLAGS
if you need to define specific
user options for Fortran 08 files.
You should normally set the $FORTRANCOMMONFLAGS
variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
SHF08PPCOM
The command line used to compile a Fortran 08 source file to a
shared-library object file
after first running the file through the C preprocessor.
Any options specified in the $SHF08FLAGS
and $CPPFLAGS
construction variables
are included on this command line.
You only need to set $SHF08PPCOM
if you need to use a specific
C-preprocessor command line for Fortran 08 files.
You should normally set the $SHFORTRANPPCOM
variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
SHF08PPCOMSTR
If set, the string displayed when a Fortran 08 source file
is compiled to a shared-library object file
after first running the file through the C preprocessor.
If not set, then $SHF08PPCOM
or $SHFORTRANPPCOM
(the command line) is displayed.
SHF77
The Fortran 77 compiler used for generating shared-library objects.
You should normally set the $SHFORTRAN
variable,
which specifies the default Fortran compiler
for all Fortran versions.
You only need to set $SHF77
if you need to use a specific compiler
or compiler version for Fortran 77 files.
SHF77COM
The command line used to compile a Fortran 77 source file
to a shared-library object file.
You only need to set $SHF77COM
if you need to use a specific
command line for Fortran 77 files.
You should normally set the $SHFORTRANCOM
variable,
which specifies the default command line
for all Fortran versions.
SHF77COMSTR
If set, the string displayed when a Fortran 77 source file
is compiled to a shared-library object file.
If not set, then $SHF77COM
or $SHFORTRANCOM
(the command line) is displayed.
SHF77FLAGS
Options that are passed to the Fortran 77 compiler
to generated shared-library objects.
You only need to set $SHF77FLAGS
if you need to define specific
user options for Fortran 77 files.
You should normally set the $FORTRANCOMMONFLAGS
variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
SHF77PPCOM
The command line used to compile a Fortran 77 source file to a
shared-library object file
after first running the file through the C preprocessor.
Any options specified in the $SHF77FLAGS
and $CPPFLAGS
construction variables
are included on this command line.
You only need to set $SHF77PPCOM
if you need to use a specific
C-preprocessor command line for Fortran 77 files.
You should normally set the $SHFORTRANPPCOM
variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
SHF77PPCOMSTR
If set, the string displayed when a Fortran 77 source file
is compiled to a shared-library object file
after first running the file through the C preprocessor.
If not set, then $SHF77PPCOM
or $SHFORTRANPPCOM
(the command line) is displayed.
SHF90
The Fortran 90 compiler used for generating shared-library objects.
You should normally set the $SHFORTRAN
variable,
which specifies the default Fortran compiler
for all Fortran versions.
You only need to set $SHF90
if you need to use a specific compiler
or compiler version for Fortran 90 files.
SHF90COM
The command line used to compile a Fortran 90 source file
to a shared-library object file.
You only need to set $SHF90COM
if you need to use a specific
command line for Fortran 90 files.
You should normally set the $SHFORTRANCOM
variable,
which specifies the default command line
for all Fortran versions.
SHF90COMSTR
If set, the string displayed when a Fortran 90 source file
is compiled to a shared-library object file.
If not set, then $SHF90COM
or $SHFORTRANCOM
(the command line) is displayed.
SHF90FLAGS
Options that are passed to the Fortran 90 compiler
to generated shared-library objects.
You only need to set $SHF90FLAGS
if you need to define specific
user options for Fortran 90 files.
You should normally set the $FORTRANCOMMONFLAGS
variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
SHF90PPCOM
The command line used to compile a Fortran 90 source file to a
shared-library object file
after first running the file through the C preprocessor.
Any options specified in the $SHF90FLAGS
and $CPPFLAGS
construction variables
are included on this command line.
You only need to set $SHF90PPCOM
if you need to use a specific
C-preprocessor command line for Fortran 90 files.
You should normally set the $SHFORTRANPPCOM
variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
SHF90PPCOMSTR
If set, the string displayed when a Fortran 90 source file
is compiled to a shared-library object file
after first running the file through the C preprocessor.
If not set, then $SHF90PPCOM
or $SHFORTRANPPCOM
(the command line) is displayed.
SHF95
The Fortran 95 compiler used for generating shared-library objects.
You should normally set the $SHFORTRAN
variable,
which specifies the default Fortran compiler
for all Fortran versions.
You only need to set $SHF95
if you need to use a specific compiler
or compiler version for Fortran 95 files.
SHF95COM
The command line used to compile a Fortran 95 source file
to a shared-library object file.
You only need to set $SHF95COM
if you need to use a specific
command line for Fortran 95 files.
You should normally set the $SHFORTRANCOM
variable,
which specifies the default command line
for all Fortran versions.
SHF95COMSTR
If set, the string displayed when a Fortran 95 source file
is compiled to a shared-library object file.
If not set, then $SHF95COM
or $SHFORTRANCOM
(the command line) is displayed.
SHF95FLAGS
Options that are passed to the Fortran 95 compiler
to generated shared-library objects.
You only need to set $SHF95FLAGS
if you need to define specific
user options for Fortran 95 files.
You should normally set the $FORTRANCOMMONFLAGS
variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
SHF95PPCOM
The command line used to compile a Fortran 95 source file to a
shared-library object file
after first running the file through the C preprocessor.
Any options specified in the $SHF95FLAGS
and $CPPFLAGS
construction variables
are included on this command line.
You only need to set $SHF95PPCOM
if you need to use a specific
C-preprocessor command line for Fortran 95 files.
You should normally set the $SHFORTRANPPCOM
variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
SHF95PPCOMSTR
If set, the string displayed when a Fortran 95 source file
is compiled to a shared-library object file
after first running the file through the C preprocessor.
If not set, then $SHF95PPCOM
or $SHFORTRANPPCOM
(the command line) is displayed.
SHFORTRAN
The default Fortran compiler used for generating shared-library objects.
SHFORTRANCOM
The command line used to compile a Fortran source file
to a shared-library object file.
By default, any options specified
in the $SHFORTRANFLAGS
,
$_FORTRANMODFLAG
, and
$_FORTRANINCFLAGS
construction variables are included on this command line.
See also $FORTRANCOM
.
SHFORTRANCOMSTR
If set, the string displayed when a Fortran source file
is compiled to a shared-library object file.
If not set, then $SHFORTRANCOM
(the command line) is displayed.
SHFORTRANFLAGS
Options that are passed to the Fortran compiler to generate shared-library objects.
SHFORTRANPPCOM
The command line used to compile a Fortran source file to a
shared-library object file
after first running the file through the C preprocessor.
By default, any options specified in the $SHFORTRANFLAGS
,
$CPPFLAGS
,
$_CPPDEFFLAGS
,
$_FORTRANMODFLAG
, and
$_FORTRANINCFLAGS
construction variables are included on this command line.
See also $SHFORTRANCOM
.
SHFORTRANPPCOMSTR
If set, the string displayed when a Fortran source file
is compiled to a shared-library object file
after first running the file through the C preprocessor.
If not set, then $SHFORTRANPPCOM
(the command line) is displayed.
SHLIBEMITTER
Contains the emitter specification for the
SharedLibrary
builder.
The manpage section "Builder Objects" contains
general information on specifying emitters.
SHLIBNOVERSIONSYMLINKS
Instructs the SharedLibrary
builder to not create symlinks for versioned
shared libraries.
SHLIBPREFIX
The prefix used for shared library file names.
_SHLIBSONAME
A macro that automatically generates shared library's SONAME based on $TARGET,
$SHLIBVERSION and $SHLIBSUFFIX. Used by SharedLibrary
builder when
the linker tool supports SONAME (e.g. gnulink
).
SHLIBSUFFIX
The suffix used for shared library file names.
SHLIBVERSION
When this construction variable is defined, a versioned shared library
is created by the SharedLibrary
builder. This activates the
$_SHLIBVERSIONFLAGS
and thus modifies the $SHLINKCOM
as
required, adds the version number to the library name, and creates the symlinks
that are needed. $SHLIBVERSION
versions should exist as alpha-numeric,
decimal-delimited values as defined by the regular expression "\w+[\.\w+]*".
Example $SHLIBVERSION
values include '1', '1.2.3', and '1.2.gitaa412c8b'.
_SHLIBVERSIONFLAGS
This macro automatically introduces extra flags to $SHLINKCOM
when
building versioned SharedLibrary
(that is when $SHLIBVERSION
is set). _SHLIBVERSIONFLAGS
usually adds $SHLIBVERSIONFLAGS
and some extra dynamically generated options (such as
-Wl,-soname=$_SHLIBSONAME
. It is unused by "plain"
(unversioned) shared libraries.
SHLIBVERSIONFLAGS
Extra flags added to $SHLINKCOM
when building versioned
SharedLibrary
. These flags are only used when $SHLIBVERSION
is
set.
SHLINK
The linker for programs that use shared libraries.
See also $LINK
for linking static objects.
On POSIX systems (those using the link
tool),
you should normally not change this value as it defaults
to a "smart" linker tool which selects a compiler
driver matching the type of source files in use.
So for example, if you set $SHCXX
to a specific
compiler name, and are compiling C++ sources,
the smartlink function will automatically select the same compiler
for linking.
SHLINKCOM
The command line used to link programs using shared libraries.
See also $LINKCOM
for linking static objects.
SHLINKCOMSTR
The string displayed when programs using shared libraries are linked.
If this is not set, then $SHLINKCOM
(the command line) is displayed.
See also $LINKCOMSTR
for linking static objects.
env = Environment(SHLINKCOMSTR = "Linking shared $TARGET")
SHLINKFLAGS
General user options passed to the linker for programs using shared libraries.
Note that this variable should
not
contain
-l
(or similar) options for linking with the libraries listed in $LIBS
,
nor
-L
(or similar) include 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.
See also $LINKFLAGS
for linking static objects.
SHOBJPREFIX
The prefix used for shared object file names.
SHOBJSUFFIX
The suffix used for shared object file names.
SONAME
Variable used to hard-code SONAME for versioned shared library/loadable module.
env.SharedLibrary('test', 'test.c', SHLIBVERSION='0.1.2', SONAME='libtest.so.2')
The variable is used, for example, by gnulink
linker tool.
SOURCE
A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" for more information).
SOURCE_URL
The URL
(web address)
of the location from which the project was retrieved.
This is used to fill in the
Source:
field in the controlling information for Ipkg and RPM packages.
See the Package
builder.
SOURCES
A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" for more information).
SOVERSION
This will construct the SONAME
using on the base library name
(test
in the example below) and use specified SOVERSION
to create SONAME
.
env.SharedLibrary('test', 'test.c', SHLIBVERSION='0.1.2', SOVERSION='2')
The variable is used, for example, by gnulink
linker tool.
In the example above SONAME
would be libtest.so.2
which would be a symlink and point to libtest.so.0.1.2
SPAWN
A command interpreter function that will be called to execute command line strings. The function must accept five arguments:
def spawn(shell, escape, cmd, args, env):
shell
is a string naming the shell program to use,
escape
is a function that can be called to escape shell special characters in
the command line,
cmd
is the path to the command to be executed,
args
holds the arguments to the command and
env
is a dictionary of environment variables
defining the execution environment in which the command should be executed.
STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME
When this variable is true, static objects and shared objects are assumed to be the same; that is, SCons does not check for linking static objects into a shared library.
SUBST_DICT
The dictionary used by the Substfile
or Textfile
builders
for substitution values.
It can be anything acceptable to the dict()
constructor,
so in addition to a dictionary,
lists of tuples are also acceptable.
SUBSTFILEPREFIX
The prefix used for Substfile
file names,
an empty string by default.
SUBSTFILESUFFIX
The suffix used for Substfile
file names,
an empty string by default.
SUMMARY
A short summary of what the project is about.
This is used to fill in the
Summary:
field in the controlling information for Ipkg and RPM packages,
and as the
Description:
field in MSI packages.
See the Package
builder.
SWIG
The name of the SWIG compiler to use.
SWIGCFILESUFFIX
The suffix that will be used for intermediate C
source files generated by SWIG.
The default value is '_wrap$CFILESUFFIX'
-
that is, the concatenation of the string
_wrap
and the current C suffix $CFILESUFFIX
.
By default, this value is used whenever the
-c++
option is
not
specified as part of the
$SWIGFLAGS
construction variable.
SWIGCOM
The command line used to call SWIG.
SWIGCOMSTR
The string displayed when calling SWIG.
If this is not set, then $SWIGCOM
(the command line) is displayed.
SWIGCXXFILESUFFIX
The suffix that will be used for intermediate C++
source files generated by SWIG.
The default value is '_wrap$CXXFILESUFFIX'
-
that is, the concatenation of the string
_wrap
and the current C++ suffix $CXXFILESUFFIX
.
By default, this value is used whenever the
-c++
option is specified as part of the
$SWIGFLAGS
construction variable.
SWIGDIRECTORSUFFIX
The suffix that will be used for intermediate C++ header
files generated by SWIG.
These are only generated for C++ code when the SWIG 'directors' feature is
turned on.
The default value is
_wrap.h
.
SWIGFLAGS
General options passed to SWIG.
This is where you should set the target language
(-python
,
-perl5
,
-tcl
, etc.)
and whatever other options you want to specify to SWIG,
such as the -c++
to generate C++ code
instead of C Code.
_SWIGINCFLAGS
An automatically-generated construction variable
containing the SWIG command-line options
for specifying directories to be searched for included files.
The value of $_SWIGINCFLAGS
is created
by respectively prepending and appending
$SWIGINCPREFIX
and $SWIGINCSUFFIX
to the beginning and end
of each directory in $SWIGPATH
.
SWIGINCPREFIX
The prefix used to specify an include directory on the SWIG command line.
This will be prepended to the beginning of each directory
in the $SWIGPATH
construction variable
when the $_SWIGINCFLAGS
variable is automatically generated.
SWIGINCSUFFIX
The suffix used to specify an include directory on the SWIG command line.
This will be appended to the end of each directory
in the $SWIGPATH
construction variable
when the $_SWIGINCFLAGS
variable is automatically generated.
SWIGOUTDIR
Specifies the output directory in which SWIG
should place generated language-specific files.
This will be used by SCons to identify
the files that will be generated by the SWIG call,
and translated into the
swig -outdir
option on the command line.
SWIGPATH
The list of directories that SWIG will search for included files. SCons' SWIG implicit dependency scanner will search these directories for include files. The default value is an empty list.
Don't explicitly put include directory
arguments in $SWIGFLAGS
the result will be non-portable
and the directories will not be searched by the dependency scanner.
Note: directory names in $SWIGPATH
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
a top-relative path (#
):
env = Environment(SWIGPATH='#/include')
The directory look-up can also be forced using the
Dir
()
function:
include = Dir('include') env = Environment(SWIGPATH=include)
The directory list will be added to command lines
through the automatically-generated
$_SWIGINCFLAGS
construction variable,
which is constructed by
respectively prepending and appending the values of the
$SWIGINCPREFIX
and $SWIGINCSUFFIX
construction variables
to the beginning and end
of each directory in $SWIGPATH
.
Any command lines you define that need
the SWIGPATH directory list should
include $_SWIGINCFLAGS
:
env = Environment(SWIGCOM="my_swig -o $TARGET $_SWIGINCFLAGS $SOURCES")
SWIGVERSION
The detected version string of the SWIG tool.
TAR
The tar archiver.
TARCOM
The command line used to call the tar archiver.
TARCOMSTR
The string displayed when archiving files
using the tar archiver.
If this is not set, then $TARCOM
(the command line) is displayed.
env = Environment(TARCOMSTR = "Archiving $TARGET")
TARFLAGS
General options passed to the tar archiver.
TARGET
A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" for more information).
TARGET_ARCH
The name of the hardware architecture that objects
created using this construction environment should target.
Can be set when creating a construction environment by passing as a keyword
argument in the Environment
call.
On the win32
platform,
if the Microsoft Visual C++ compiler is available,
msvc
tool setup is done using
$HOST_ARCH
and $TARGET_ARCH
.
If a value is not specified,
will be set to the same value as $HOST_ARCH
.
Changing the value after the environment is initialized
will not cause the tool to be reinitialized.
Compiled objects will be in the target architecture if
the compilation system supports generating for that target.
The latest compiler which can fulfill the requirement will
be selected, unless a different version is directed by the
value of the $MSVC_VERSION
construction variable.
On the win32/msvc combination, valid target arch values are
x86
,
arm
,
i386
for 32-bit targets and
amd64
,
arm64
,
x86_64
and ia64
(Itanium)
for 64-bit targets.
For example, if you want to compile 64-bit binaries, you would set
TARGET_ARCH='x86_64'
when creating the construction environment.
Note that not all target architectures are
supported for all Visual Studio / MSVC versions.
Check the relevant Microsoft documentation.
$TARGET_ARCH
is not currently used by other compilation tools,
but the option is reserved to do so in future
TARGET_OS
The name of the operating system that objects
created using this construction environment should target.
Can be set when creating a construction environment by passing as a keyword
argument in the Environment
call;.
$TARGET_OS
is not currently used by SCons
but the option is reserved to do so in future
TARGETS
A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" for more information).
TARSUFFIX
The suffix used for tar file names.
TEMPFILE
A callable object used to handle overly long command line strings,
since operations which call out to a shell will fail
if the line is longer than the shell can accept.
This tends to particularly impact linking.
The tempfile object stores the command line in a temporary
file in the appropriate format, and returns
an alternate command line so the invoked tool will make
use of the contents of the temporary file.
If you need to replace the default tempfile object,
the callable should take into account the settings of
$MAXLINELENGTH
,
$TEMPFILEPREFIX
,
$TEMPFILESUFFIX
,
$TEMPFILEARGJOIN
,
$TEMPFILEDIR
and
$TEMPFILEARGESCFUNC
.
TEMPFILEARGESCFUNC
The default argument escape function is
SCons.Subst.quote_spaces
.
If you need to apply extra operations on a command argument
(to fix Windows slashes, normalize paths, etc.)
before writing to the temporary file,
you can set the $TEMPFILEARGESCFUNC
variable to a custom function.
Such a function takes a single string argument and returns
a new string with any modifications applied.
Example:
import sys import re from SCons.Subst import quote_spaces WINPATHSEP_RE = re.compile(r"\\([^\"'\\]|$)") def tempfile_arg_esc_func(arg): arg = quote_spaces(arg) if sys.platform != "win32": return arg # GCC requires double Windows slashes, let's use UNIX separator return WINPATHSEP_RE.sub(r"/\1", arg) env["TEMPFILEARGESCFUNC"] = tempfile_arg_esc_func
TEMPFILEARGJOIN
The string to use to join the arguments passed to
$TEMPFILE
when the command line exceeds the limit set by
$MAXLINELENGTH
.
The default value is a space.
However for MSVC, MSLINK the default is a line separator
as defined by os.linesep
.
Note this value is used literally and not expanded by the subst logic.
TEMPFILEDIR
The directory to create the long-lines temporary file in.
TEMPFILEPREFIX
The prefix for the name of the temporary file used
to store command lines exceeding $MAXLINELENGTH
.
The default prefix is '@'
, which works for the Microsoft Visual C++
and GNU toolchains on Windows.
Set this appropriately for other toolchains,
for example '-@'
for the diab compiler
or '-via'
for ARM toolchain.
TEMPFILESUFFIX
The suffix for the name of the temporary file used
to store command lines exceeding $MAXLINELENGTH
.
The suffix should include the dot ('.') if one is wanted as
it will not be added automatically.
The default is .lnk
.
TEX
The TeX formatter and typesetter.
TEXCOM
The command line used to call the TeX formatter and typesetter.
TEXCOMSTR
The string displayed when calling
the TeX formatter and typesetter.
If this is not set, then $TEXCOM
(the command line) is displayed.
env = Environment(TEXCOMSTR = "Building $TARGET from TeX input $SOURCES")
TEXFLAGS
General options passed to the TeX formatter and typesetter.
TEXINPUTS
List of directories that the LaTeX program will search for include directories. The LaTeX implicit dependency scanner will search these directories for \include and \import files.
TEXTFILEPREFIX
The prefix used for Textfile
file names,
an empty string by default.
TEXTFILESUFFIX
The suffix used for Textfile
file names;
.txt
by default.
TOOLS
A list of the names of the Tool specification modules that were actually initialized in the current construction environment. This may be useful as a diagnostic aid to see if a tool did (or did not) run. The value is informative and is not guaranteed to be complete.
UNCHANGED_SOURCES
A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" for more information).
UNCHANGED_TARGETS
A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" for more information).
VENDOR
The person or organization who supply the packaged software.
This is used to fill in the
Vendor:
field in the controlling information for RPM packages,
and the
Manufacturer:
field in the controlling information for MSI packages.
See the Package
builder.
VERSION
The version of the project, specified as a string.
See the Package
builder.
VSWHERE
Specify the location of vswhere.exe.
The vswhere.exe executable is distributed with Microsoft Visual Studio and Build Tools since the 2017 edition, but is also available as a standalone installation. It allows queries to obtain detailed information about installations of 2017 and later editions. SCons makes use of this information to determine the state of compiler support for those editions.
Setting the $VSWHERE
variable to the path to a specific
vswhere.exe binary
causes SCons to use that binary.
If not set, SCons will search for one,
looking in the following locations in order,
using the first found
($VSWHERE
is updated with the location):
%ProgramFiles(x86)%\Microsoft Visual Studio\Installer |
%ProgramFiles%\Microsoft Visual Studio\Installer |
%ChocolateyInstall%\bin |
%LOCALAPPDATA%\Microsoft\WinGet\Links |
%USERPROFILE%\scoop\shims |
%SCOOP%\shims |
In order to take effect, $VSWHERE
must be set before
the initial Microsoft Visual C++ compiler discovery takes place.
Discovery happens, at the latest, during the first call to the
Environment
function, unless a tools
list is specified which excludes the entire Microsoft Visual C++ toolchain -
that is, omits "defaults"
and any specific tool module that refers to parts of the toolchain
(msvc
, mslink
, masm
, midl
and msvs
). In this case, detection is deferred until
any one of those tool modules is invoked manually.
The following two examples illustrate this:
# VSWHERE set as Environment is created env = Environment(VSWHERE='c:/my/path/to/vswhere') # Initialization deferred with empty tools, triggered manually env = Environment(tools=[]) env['VSWHERE'] = r'c:/my/vswhere/install/location/vswhere.exe' env.Tool('msvc') env.Tool('mslink') env.Tool('msvs')
WINDOWS_EMBED_MANIFEST
Set to True
to embed the
compiler-generated manifest
(normally ${TARGET}.manifest
)
into all Windows executables and DLLs built with this environment,
as a resource during their link step.
This is done using $MT
and $MTEXECOM
and $MTSHLIBCOM
.
See also $WINDOWS_INSERT_MANIFEST
.
WINDOWS_INSERT_DEF
If set to true,
a library build of a Windows shared library
(.dll
file)
will include a reference to the corresponding
module-definition file at the same time,
if a module-definition file
is not already listed as a build target.
The name of the module-definition file will
be constructed from the base name of the library
and the construction variables
$WINDOWSDEFSUFFIX
and
$WINDOWSDEFPREFIX
.
The default is to not add a module-definition file.
The module-definition file is not created by this directive,
and must be supplied by the developer.
WINDOWS_INSERT_MANIFEST
If set to true,
scons
will add the manifest file
generated by Microsoft Visual C++ 8.0 and later
to the target list so SCons will be aware they
were generated.
In the case of an executable, the manifest file name
is constructed using
$WINDOWSPROGMANIFESTSUFFIX
and
$WINDOWSPROGMANIFESTPREFIX
.
In the case of a shared library, the manifest file name
is constructed using
$WINDOWSSHLIBMANIFESTSUFFIX
and
$WINDOWSSHLIBMANIFESTPREFIX
.
See also $WINDOWS_EMBED_MANIFEST
.
WINDOWSDEFPREFIX
The prefix used for a Windows linker module-definition file name. Defaults to empty.
WINDOWSDEFSUFFIX
The suffix used for a Windows linker module-definition file name.
Defaults to .def
.
WINDOWSEXPPREFIX
The prefix used for Windows linker exports file names. Defaults to empty.
WINDOWSEXPSUFFIX
The suffix used for Windows linker exports file names.
Defaults to .exp
.
WINDOWSPROGMANIFESTPREFIX
The prefix used for executable program manifest files generated by Microsoft Visual C++. Defaults to empty.
WINDOWSPROGMANIFESTSUFFIX
The suffix used for executable program manifest files
generated by Microsoft Visual C++.
Defaults to .manifest
.
WINDOWSSHLIBMANIFESTPREFIX
The prefix used for shared library manifest files generated by Microsoft Visual C++. Defaults to empty.
WINDOWSSHLIBMANIFESTSUFFIX
The suffix used for shared library manifest files
generated by Microsoft Visual C++.
Defaults to .manifest
.
X_IPK_DEPENDS
This is used to fill in the
Depends:
field in the controlling information for Ipkg packages.
See the Package
builder.
X_IPK_DESCRIPTION
This is used to fill in the
Description:
field in the controlling information for Ipkg packages.
The default value is
“$SUMMARY
\n$DESCRIPTION
”
X_IPK_MAINTAINER
This is used to fill in the
Maintainer:
field in the controlling information for Ipkg packages.
X_IPK_PRIORITY
This is used to fill in the
Priority:
field in the controlling information for Ipkg packages.
X_IPK_SECTION
This is used to fill in the
Section:
field in the controlling information for Ipkg packages.
X_MSI_LANGUAGE
This is used to fill in the
Language:
attribute in the controlling information for MSI packages.
See the Package
builder.
X_MSI_LICENSE_TEXT
The text of the software license in RTF format. Carriage return characters will be replaced with the RTF equivalent \\par.
See the Package
builder.
X_MSI_UPGRADE_CODE
TODO
X_RPM_AUTOREQPROV
This is used to fill in the
AutoReqProv:
field in the RPM
.spec
file.
See the Package
builder.
X_RPM_BUILD
internal, but overridable
X_RPM_BUILDREQUIRES
This is used to fill in the
BuildRequires:
field in the RPM
.spec
file.
Note this should only be used on a host managed by rpm as the dependencies will not be resolvable at build time otherwise.
X_RPM_BUILDROOT
internal, but overridable
X_RPM_CLEAN
internal, but overridable
X_RPM_CONFLICTS
This is used to fill in the
Conflicts:
field in the RPM
.spec
file.
X_RPM_DEFATTR
This value is used as the default attributes for the files in the RPM package. The default value is “(-,root,root)”.
X_RPM_DISTRIBUTION
This is used to fill in the
Distribution:
field in the RPM
.spec
file.
X_RPM_EPOCH
This is used to fill in the
Epoch:
field in the RPM
.spec
file.
X_RPM_EXCLUDEARCH
This is used to fill in the
ExcludeArch:
field in the RPM
.spec
file.
X_RPM_EXLUSIVEARCH
This is used to fill in the
ExclusiveArch:
field in the RPM
.spec
file.
X_RPM_EXTRADEFS
A list used to supply extra defintions or flags
to be added to the RPM .spec
file.
Each item is added as-is with a carriage return appended.
This is useful if some specific RPM feature not otherwise
anticipated by SCons needs to be turned on or off.
Note if this variable is omitted, SCons will by
default supply the value
'%global debug_package %{nil}'
to disable debug package generation.
To enable debug package generation, include this
variable set either to None, or to a custom
list that does not include the default line.
New in version 3.1.
env.Package( NAME="foo", ... X_RPM_EXTRADEFS=[ "%define _unpackaged_files_terminate_build 0" "%define _missing_doc_files_terminate_build 0" ], ... )
X_RPM_GROUP
This is used to fill in the
Group:
field in the RPM
.spec
file.
X_RPM_GROUP_lang
This is used to fill in the
Group(lang):
field in the RPM
.spec
file.
Note that
lang
is not literal
and should be replaced by
the appropriate language code.
X_RPM_ICON
This is used to fill in the
Icon:
field in the RPM
.spec
file.
X_RPM_INSTALL
internal, but overridable
X_RPM_PACKAGER
This is used to fill in the
Packager:
field in the RPM
.spec
file.
X_RPM_POSTINSTALL
This is used to fill in the
%post:
section in the RPM
.spec
file.
X_RPM_POSTUNINSTALL
This is used to fill in the
%postun:
section in the RPM
.spec
file.
X_RPM_PREFIX
This is used to fill in the
Prefix:
field in the RPM
.spec
file.
X_RPM_PREINSTALL
This is used to fill in the
%pre:
section in the RPM
.spec
file.
X_RPM_PREP
internal, but overridable
X_RPM_PREUNINSTALL
This is used to fill in the
%preun:
section in the RPM
.spec
file.
X_RPM_PROVIDES
This is used to fill in the
Provides:
field in the RPM
.spec
file.
X_RPM_REQUIRES
This is used to fill in the
Requires:
field in the RPM
.spec
file.
X_RPM_SERIAL
This is used to fill in the
Serial:
field in the RPM
.spec
file.
X_RPM_URL
This is used to fill in the
Url:
field in the RPM
.spec
file.
XGETTEXT
Path to xgettext(1) program (found via
Detect()
).
See xgettext
tool and POTUpdate
builder.
XGETTEXTCOM
Complete xgettext command line.
See xgettext
tool and POTUpdate
builder.
XGETTEXTCOMSTR
A string that is shown when xgettext(1) command is invoked
(default: ''
, which means "print $XGETTEXTCOM
").
See xgettext
tool and POTUpdate
builder.
_XGETTEXTDOMAIN
Internal "macro". Generates xgettext domain name
form source and target (default: '${TARGET.filebase}'
).
XGETTEXTFLAGS
Additional flags to xgettext(1).
See xgettext
tool and POTUpdate
builder.
XGETTEXTFROM
Name of file containing list of xgettext(1)'s source
files. Autotools' users know this as POTFILES.in
so they
will in most cases set XGETTEXTFROM="POTFILES.in"
here.
The $XGETTEXTFROM
files have same syntax and semantics as the well known
GNU POTFILES.in
.
See xgettext
tool and POTUpdate
builder.
_XGETTEXTFROMFLAGS
Internal "macro". Genrates list of -D<dir>
flags
from the $XGETTEXTPATH
list.
XGETTEXTFROMPREFIX
This flag is used to add single $XGETTEXTFROM
file to
xgettext(1)'s commandline (default:
'-f'
).
XGETTEXTFROMSUFFIX
(default: ''
)
XGETTEXTPATH
List of directories, there xgettext(1) will look for
source files (default: []
).
This variable works only together with $XGETTEXTFROM
_XGETTEXTPATHFLAGS
Internal "macro". Generates list of -f<file>
flags
from $XGETTEXTFROM
.
XGETTEXTPATHPREFIX
This flag is used to add single search path to
xgettext(1)'s commandline (default:
'-D'
).
XGETTEXTPATHSUFFIX
(default: ''
)
YACC
The parser generator.
YACC_GRAPH_FILE
If supplied, write a graph of the automaton to a file with the name
taken from this variable.
Will be emitted as a --graph=
command-line option. Use this in preference to including
--graph=
in $YACCFLAGS
directly.
New in version 4.4.0.
YACC_GRAPH_FILE_SUFFIX
Previously specified by $YACCVCGFILESUFFIX
.
The suffix of the file
containing a graph of the grammar automaton
when the -g
option
(or --graph=
without an option-argument)
is used in $YACCFLAGS
.
Note that setting this variable informs SCons
how to construct the graph filename for tracking purposes,
it does not affect the actual generated filename.
Various yacc tools have emitted various formats
at different times.
Set this to match what your parser generator produces.
New in version 4.6.0.
YACC_HEADER_FILE
If supplied, generate a header file with the name taken from this variable.
Will be emitted as a --header=
command-line option. Use this in preference to including
--header=
in $YACCFLAGS
directly.
New in version 4.4.0.
YACCCOM
The command line used to call the parser generator to generate a source file.
YACCCOMSTR
The string displayed when generating a source file
using the parser generator.
If this is not set, then $YACCCOM
(the command line) is displayed.
env = Environment(YACCCOMSTR="Yacc'ing $TARGET from $SOURCES")
YACCFLAGS
General options passed to the parser generator.
In addition to passing the value on during invocation,
the yacc
tool also examines this construction variable for options
which cause additional output files to be generated,
and adds those to the target list.
If the -d
option is present in $YACCFLAGS
scons assumes that the call will also create a header file
with the suffix defined by $YACCHFILESUFFIX
if the yacc source file ends in a .y
suffix,
or a file with the suffix defined by $YACCHXXFILESUFFIX
if the yacc source file ends in a .yy
suffix.
The header will have the same base name as the requested target.
This is only correct if the executable is bison
(or win_bison).
If using Berkeley yacc (byacc),
y.tab.h
is always written -
avoid the -d
in this case and
use $YACC_HEADER_FILE
instead.
If a -g
option is present,
scons assumes that the call will also create a graph file
with the suffix defined by $YACCVCGFILESUFFIX
.
If a -v
option is present,
scons assumes that the call will also create an output debug file
with the suffix .output
.
Also recognized are GNU bison options
--header
(and its deprecated synonym --defines
),
which is similar to
-d
but gives the option to explicitly name the output header file
through an option argument;
and --graph
,
which is similar to
-g
but gives the option to explicitly name the output graph file
through an option argument.
The file suffixes described for
-d
and -g
above
are not applied if these are used in the option=argument form.
Note that files specified by --header=
and
--graph=
may not be properly handled
by SCons in all situations, and using those in $YACCFLAGS
should be considered legacy support only.
Consider using $YACC_HEADER_FILE
and $YACC_GRAPH_FILE
instead
if the files need to be explicitly named
(new in version 4.4.0).
YACCHFILESUFFIX
The suffix of the C
header file generated by the parser generator
when the -d
option
(or --header
without an option-argument)
is used in $YACCFLAGS
.
Note that setting this variable informs SCons
how to construct the header filename for tracking purposes,
it does not affect the actual generated filename.
Set this to match what your parser generator produces.
The default value is
.h
.
YACCHXXFILESUFFIX
The suffix of the C++
header file generated by the parser generator
when the -d
option
(or --header
without an option-argument)
is used in $YACCFLAGS
.
Note that setting this variable informs SCons
how to construct the header filename for tracking purposes,
it does not affect the actual generated filename.
Set this to match what your parser generator produces.
The default value is .hpp
.
YACCVCGFILESUFFIX
Obsoleted. Use $YACC_GRAPH_FILE_SUFFIX
instead.
The value is used only if $YACC_GRAPH_FILE_SUFFIX
is not set.
The default value is .gv
.
Changed in version 4.6.0: deprecated. The default value
changed from .vcg
(bison stopped generating
.vcg
output with version 2.4, in 2006).
ZIP
The zip compression and file packaging utility.
ZIP_OVERRIDE_TIMESTAMP
An optional timestamp which overrides the last modification time of the file when stored inside the Zip archive. This is a tuple of six values: Year (>= 1980) Month (one-based) Day of month (one-based) Hours (zero-based) Minutes (zero-based) Seconds (zero-based)
ZIPCOM
The command line used to call the zip utility, or the internal Python function used to create a zip archive.
ZIPCOMPRESSION
The
compression
flag
from the Python
zipfile
module used by the internal Python function
to control whether the zip archive
is compressed or not.
The default value is
zipfile.ZIP_DEFLATED
,
which creates a compressed zip archive.
This value has no effect if the
zipfile
module is unavailable.
ZIPCOMSTR
The string displayed when archiving files
using the zip utility.
If this is not set, then $ZIPCOM
(the command line or internal Python function) is displayed.
env = Environment(ZIPCOMSTR = "Zipping $TARGET")
ZIPFLAGS
General options passed to the zip utility.
ZIPROOT
An optional zip root directory (default empty). The filenames stored in the zip file will be relative to this directory, if given. Otherwise the filenames are relative to the current directory of the command. For instance:
env = Environment() env.Zip('foo.zip', 'subdir1/subdir2/file1', ZIPROOT='subdir1')
will produce a zip file foo.zip
containing a file with the name
subdir2/file1
rather than
subdir1/subdir2/file1
.
ZIPSUFFIX
The suffix used for zip file names.