SCons User Guide 0.92
Steven Knight
Copyright
© 2003 by Steven Knight
version 0.92
Table of Contents
Preface
Why
SCons
?
SCons
Principles
History
Acknowledgements
Contact
Simple Builds
The
SConstruct
File
Compiling Multiple Source Files
Keeping
SConstruct
Files Easy to Read
Keyword Arguments
Compiling Multiple Programs
Sharing Source Files Between Multiple Programs
Construction Environments
Multiple
Construction Environments
Copying
Construction Environments
Fetching Values From a
Construction Environment
Modifying a
Construction Environment
Replacing Values in a
Construction Environment
Appending to the End of Values in a
Construction Environment
Appending to the Beginning of Values in a
Construction Environment
Building and Linking with Libraries
Building Libraries
Linking with Libraries
Finding Libraries: the
LIBPATH
Construction Variable
Dependencies
Source File Signatures
MD5 Source File Signatures
Source File Time Stamps
Target File Signatures
Build Signatures
File Contents
Implicit Dependencies: The
CPPPATH
Construction Variable
Caching Implicit Dependencies
The
--implicit-deps-changed
Option
The
--implicit-deps-unchanged
Option
The
Ignore
Method
The
Depends
Method
Default Targets
Providing Build Help
Installing Files in Other Directories
Installing Multiple Files in a Directory
Installing a File Under a Different Name
Installing Multiple Files Under Different Names
Preventing Removal of Targets
Hierarchical Builds
SConscript
Files
Path Names Are Relative to the
SConscript
Directory
Top-Level Path Names in Subsidiary
SConscript
Files
Absolute Path Names
Sharing Environments (and Other Variables) Between
SConscript
Files
Exporting Variables
Importing Variables
Returning Values From an
SConscript
File
Separating Source and Build Directories
Specifying a Build Directory as Part of an
SConscript
Call
Why
SCons
Duplicates Source Files in a Build Directory
Telling
SCons
to Not Duplicate Source Files in the Build Directory
The
BuildDir
Function
Using
BuildDir
With an
SConscript
File
Why You'd Want to Call
BuildDir
Instead of
SConscript
Variant Builds
Built-In Builders
Programs: the
Program
Builder
Object-File Builders
The
StaticObject
Builder
The
SharedObject
Builder
The
Object
Builder
Library Builders
The
StaticLibrary
Builder
The
SharedLibrary
Builder
The
Library
Builder
Pre-Compiled Headers: the
PCH
Builder
Microsoft Visual C++ Resource Files: the
RES
Builder
Source Files
The
CFile
Builder
The
CXXFile
Builder
Documents
The
DVI
Builder
The
PDF
Builder
The
PostScript
Builder
Archives
The
Tar
Builder
The
Zip
Builder
Java
Building Class Files: the
Java
Builder
The
Jar
Builder
Building C header and stub files: the
JavaH
Builder
Building RMI stub and skeleton class files: the
RMIC
Builder
Writing Your Own Builders
Writing Builders That Execute External Commands
Attaching a Builder to a
Construction Environment
Letting
SCons
Handle The File Suffixes
Builders That Execute Python Functions
Builders That Create Actions Using a
Generator
Builders That Modify the Target or Source Lists Using an
Emitter
Builders That Use Other Builders
Not Writing a Builder: The
Command
Builder
SCons Actions
XXX
Writing Scanners
XXX
Building From Code Repositories
The
Repository
Method
Finding source files in repositories
Finding the
SConstruct
file in repositories
Finding derived files in repositories
Guaranteeing local copies of files
Fetching Files From Source Code Management Systems
Fetching Source Code From BitKeeper
Fetching Source Code From CVS
Fetching Source Code From RCS
Fetching Source Code From SCCS
Fetching Source Code From Subversion
Caching Built Files
Specifying the Shared Cache Directory
Keeping Build Output Consistent
Not Retrieving Files From a Shared Cache
Populating a Shared Cache With Already-Built Files
Alias Targets
How to Run
SCons
Selective Builds
Overriding Construction Variables
The
SCONSFLAGS
Environment Variable
Troubleshooting
XXX
Complex
SCons
Example
XXX
Converting From Make
Differences Between
Make
and
SCons
Advantages of
SCons
Over
Make
Converting From Cons
Differences Between
Cons
and
SCons
Advantages of
SCons
Over
Cons
Converting From Ant
Differences Between
Ant
and
SCons
Advantages of
SCons
Over
Ant
Next >>>
Preface