diff --git a/doc/user_guide.md b/doc/user_guide.md index 584f4db..79a1d16 100644 --- a/doc/user_guide.md +++ b/doc/user_guide.md @@ -73,6 +73,13 @@ files, dependency files, etc...) in a `build` directory. This keeps files generated by the build cleanly separated from user-controlled source files. +## Getting Started + +To use Rscons on your project, you must: + + 1. Install the `rscons` script in your project (See [#Installation]). + 2. Write the `Rsconscript` build script for your project (See [#The Build Script]). + # Installation Rscons is designed to be distributed as a stand-alone single file script that @@ -90,7 +97,7 @@ The following files should be added to source control: * `rscons` * `Rsconscript` -Add the following line to `.gitignore` (or the equivalent thereof for different +Add the following contents to `.gitignore` (or the equivalent thereof for different version control systems): ``` @@ -98,26 +105,6 @@ version control systems): /build/ ``` -# The Build Script - -Rscons looks for instructions for what to build by reading a build script file -called `Rsconscript` (or `Rsconscript.rb`). -Here is a simple example `Rsconscript` file: - -```ruby -build do - Environment.new do |env| - env.Program("myprog.exe", glob("src/**/*.c")) - end -end -``` - -This `Rsconscript` file would instruct Rscons to produce a *Program* target -called `myprog.exe` which is to be built from all C source files found -(recursively) under the `src` directory. - -The `Rsconscript` file is a Ruby script. - # Command-Line Operation Rscons is typically invoked from the command-line as `./rscons`. @@ -179,7 +166,25 @@ An `uninstall` operation will remove any items installed by an `install` operation. It will not remove all built target files, just the installed copies. -# Writing the Build Script +# The Build Script + +Rscons looks for instructions for what to build by reading a build script file +called `Rsconscript` (or `Rsconscript.rb`). +Here is a simple example `Rsconscript` file: + +```ruby +build do + Environment.new do |env| + env.Program("myprog.exe", glob("src/**/*.c")) + end +end +``` + +This `Rsconscript` file would instruct Rscons to produce a *Program* target +called `myprog.exe` which is to be built from all C source files found +(recursively) under the `src` directory. + +The `Rsconscript` file is a Ruby script. ## Configuration Operations