Chapter 11. Controlling Build Output

A key aspect of creating a usable build configuration
is providing good output from the build
so its users can readily understand
what the build is doing
and get information about how to control the build.
SCons provides several ways of
controlling output from the build configuration
to help make the build
more useful and understandable.

It's often very useful to be able to give
users some help that describes the
specific targets, build options, etc.,
that can be used for your build.
SCons provides the Help function
to allow you to specify this help text:

The SConscript files may contain
multiple calls to the Help function,
in which case the specified text(s)
will be concatenated when displayed.
This allows you to split up the
help text across multiple SConscript files.
In this situation, the order in
which the SConscript files are called
will determine the order in which the Help functions are called,
which will determine the order in which
the various bits of text will get concatenated.

Another use would be to make the help text conditional
on some variable.
For example, suppose you only want to display
a line about building a Windows-only
version of a program when actually
run on Windows.
The following SConstruct file:

If there is no Help text in the SConstruct or
SConscript files,
SCons will revert to displaying its
standard list that describes the SCons command-line
options.
This list is also always displayed whenever
the -H option is used.