diff --git a/doc/user_guide.md b/doc/user_guide.md index 79a1d16..cda6d52 100644 --- a/doc/user_guide.md +++ b/doc/user_guide.md @@ -369,13 +369,32 @@ source files found recursively under the `src` directory. ### Environments -An Environment is a collection of: +An Environment includes: - - construction variables - - build hooks - - registered build targets + - a collection of construction variables + - a collection of build hooks + - a collection of user-registered build targets + - a build root All build targets must be registered within an `Environment`. +The Environment's build root is a directory created within the top-level +Rscons build directory. +By default it holds all intermediate files generated by Rscons that are needed +to produce a user-specified build target. +For example, for the `Rsconscript`: + +```ruby +build do + Environment.new do |env| + env.Program("myprog.exe", glob("src/**/*.c")) + end +end +``` + +Rscons will place an object file and dependency file corresponding to each C +source file under the Environment's build root. +This keeps the intermediate generated build artifacts separate from the source +files. ### Specifying Source Files: The glob Method