man scons Command

Man page for apt-get scons Command

Man Page for scons in Linux

Ubuntu Man Command : man scons

Man Scons  Command

This tutorial shows the man page for man scons in linux.

Open terminal with 'su' access and type the command as shown below:
man scons

Result of the Command Execution shown below:

SCONS(1)                                                              SCONS(1)

scons a software construction tool

scons [ options... ] [ name=val... ] [ targets... ]

The scons utility builds software (or other files) by determining which
component pieces must be rebuilt and executing the necessary commands
to rebuild them.

By default, scons searches for a file named SConstruct, Sconstruct, or
sconstruct (in that order) in the current directory and reads its con
figuration from the first file found. An alternate file name may be
specified via the f option.

The SConstruct file can specify subsidiary configuration files using
the SConscript() function. By convention, these subsidiary files are
named SConscript, although any name may be used. (Because of this nam
ing convention, the term "SConscript files" is sometimes used to refer
generically to all scons configuration files, regardless of actual file

The configuration files specify the target files to be built, and
(optionally) the rules to build those targets. Reasonable default
rules exist for building common software components (executable pro
grams, object files, libraries), so that for most software projects,
only the target and input files need be specified.

Before reading the SConstruct file, scons looks for a directory named
site_scons in the directory containing the SConstruct file; if it
exists, site_scons is added to sys.path, the file
site_scons/, is evaluated if it exists, and the directory
site_scons/site_tools is added to the default toolpath if it exist.
See the no site dir and site dir options for more details.

scons reads and executes the SConscript files as Python scripts, so you
may use normal Python scripting capabilities (such as flow control,
data manipulation, and imported Python libraries) to handle complicated
build situations. scons, however, reads and executes all of the SCon
script files before it begins building any targets. To make this obvi
ous, scons prints the following messages about what it is doing:

$ scons foo.out
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
cp foo.out
scons: done building targets.

The status messages (everything except the line that reads "cp
foo.out") may be suppressed using the Q option.

scons does not automatically propagate the external environment used to
execute scons to the commands used to build target files. This is so
that builds will be guaranteed repeatable regardless of the environment
variables set at the time scons is invoked. This also means that if
the compiler or other commands that you want to use to build your tar
get files are not in standard system locations, scons will not find
them unless you explicitly set the PATH to include those locations.
Whenever you create an scons construction environment, you can propa
gate the value of PATH from your external environment as follows:

import os
env = Environment(ENV = {'PATH' : os.environ['PATH']})

Similarly, if the commands use external environment variables like
$PATH, $HOME, $JAVA_HOME, $LANG, $SHELL, $TERM, etc., these variables
can also be explicitly propagated:

import os
env = Environment(ENV = {'PATH' : os.environ['PATH'],
'HOME' : os.environ['HOME']})

Or you may explicitly propagate the invoking user's complete external

import os
env = Environment(ENV = os.environ)

This comes at the expense of making your build dependent on the user's
environment being set correctly, but it may be more convenient for many

scons can scan known input files automatically for dependency informa
tion (for example,

Related Topics

Apt Get Commands