Making Builds with SConsThis document is intended primarily for those who want to build SAS software such as ScienceTools or GlastRelease from source, or for those doing restricted development of C++ or Python code which does not involve adding new libraries, creating new packages, etc. The full-time developer should also consult SCons for Developers. End users (those wishing only to run applications, not build them) should see SCons: An Introduction. Full documentation on all SCons features can be found at: GoGui: A GUI for developing with SConsGoGui provides a development environment for SCons similar to that provided for CMT by MRvcmt. Functions include CVS checkout, commit, update and tagging; building a package or an entire installation; and running and debugging programs. For a more complete description including screen shots, see Running SCons from the Command LineSee the initial sections of SCons for Developers for prerequisites. In particular, suitable versions of Python (at least 2.5.1; 2.7.x imminent) and SCons (2.1.0 recommended for all platforms; at least 1.3.0 required for Windows) should be installed. It will be more convenient to use SCons from the command line if it is in your path. The environment variable GLAST_EXT should be suitably defined. Command line helpFor options available with SCons as distributed (and assuming the scons command is in your path) type
To get help on additional options added specially for SAS software such as ScienceTools, you must first have a local installation of the software. Source installation from CVSTo find out what versions are available, refer to the the New Release Manager web interface. Select package (ScienceTools, GlastRelease) and version type (Release build, Head, Latest) and filter with the controls at the top of the page. Then issue a cvs command like this:
This will create a directory ScienceTools-scon containing the source. You can give the directory another name by using the -d option in the above command, e.g.
Then, assuming scons is in your path, to get a list of all options (those included with the SCons distribution and those added to SCons specifically for SAS software) issue the command:
Note: The options like --with-GLAST-EXT, written specifically for SAS software, have been added locally. They were not written — and are not supported — by the SCons developers. Source installation from RMViewerAfter selecting the release and operating system you are interested in, choose "Source Download" from the Download menu. See the RMViewer Users Guide for complete information on installing and using RMViewer. Source installation Using an InstallerThe GUI or command-lineinstallers may be used to fetch source, developer or end-user distributions. Building a Single, Specific Package (and its dependencies)To build a single package, simply specify the package name as the target preceded by options as needed. Note: The --with-GLAST-EXT option must always be supplied; others are optional under most circumstances. For example, on most platforms to make a debug build of the astro packages (and any dependencies) issue the following command:
More Build ExamplesYou may replace package name (astro in the above command) with any of the following:
Ignoring ErrorsBy default, SCons will stop compilation after the first error it encounters. If the error is not for a target you actually need or if you want to see what other independent build problems there are, use the -k ("keep going") option. SCons will continue trying to build any target which does not depend on the failed target. SCons Build OutputWhen SCons is performing a build, some output (e.g. libraries) is dependent on compiler, operating system, and settings such as debug/optimized. Such output is kept in variant subdirectories. Typical variant names are redhat5-i686-32bit-gcc41-Optimized and Windows-i386-32bit-vc90-Debug. Output needed to run programs (as opposed to intermediate build products) ends up in one of the following subdirectories of the directory containing the SConstruct file:
Note: Additional output directories may be created in the future. They will follow the same convention:
|