1 OverviewRscons is an open-source build system for developers. It supports the following features:
At its core, Rscons is mainly an engine to:
Along the way, Rscons provides a concise syntax for specifying common types of build operations, but also provides an extensible framework for performing custom build operations as well. Rscons is written in Ruby, and is inspired by SCons and waf. 1.1 Design Principles1.1.1 Build CorrectnessThe number one design principle in Rscons is build correctness. This means that a build operation will be performed when Rscons cannot determine that a build target is already up-to-date. A build target will be built whenever:
Importantly, Rscons uses the content of a source (dependency) file to determine whether a rebuild is necessary, not simply the timestamp of the file. This is because relying solely on the timestamp of the file can lead to an incorrect decision being made to not rebuild when a rebuild is necessary. 1.1.2 Build FlexibilityRscons supports multiple configurations of compilation flags or build options across multiple environments to build output files in different ways according to the user's desire. For example, the same source files can be built into a release executable, but also compiled with different compilation flags or build options into a test executable. Rscons also supports build hooks, which allow the user to further fine-tune the build system's operation. A build hook, for example, can be used to set a build option for only source files coming from a particular source directory. 1.1.3 Build EfficiencyRscons will automatically determine the number of threads to use based on the host CPU configuration, and will schedule jobs as efficiently as possible across the available threads in order to complete the build operation in as little time as possible. As development occurs and build operations are executed, Rscons makes use of a cache file in order to avoid rebuilding a target when it is already up to date. 1.1.4 Build DirectoryRscons was designed to store temporary build artifacts (for example, object
files, dependency files, etc...) in a 1.2 Getting StartedTo use Rscons on your project, you must:
|