summaryrefslogtreecommitdiffstats
path: root/doc/user/simple.in
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-02-28 09:25:48 (GMT)
committerSteven Knight <knight@baldmt.com>2004-02-28 09:25:48 (GMT)
commitf44fa0975d10611186de5a61d8e061154e92bccc (patch)
tree40f86de321e05aa6a301b81f8b83039dcacb7d5f /doc/user/simple.in
parent5b26639256205eabd4e055040c7529b8ec868dcf (diff)
downloadSCons-f44fa0975d10611186de5a61d8e061154e92bccc.zip
SCons-f44fa0975d10611186de5a61d8e061154e92bccc.tar.gz
SCons-f44fa0975d10611186de5a61d8e061154e92bccc.tar.bz2
Branch for User's Guide work.
Diffstat (limited to 'doc/user/simple.in')
-rw-r--r--doc/user/simple.in60
1 files changed, 56 insertions, 4 deletions
diff --git a/doc/user/simple.in b/doc/user/simple.in
index 3940bc3..3d9d7dc 100644
--- a/doc/user/simple.in
+++ b/doc/user/simple.in
@@ -111,6 +111,58 @@
</para>
<section>
+ <title>Cleaning Up After a Build</title>
+
+ <para>
+
+ When using &SCons;, it is unnecessary to add special
+ commands or target names to clean up after a build.
+ Instead, you simply use the
+ <literal>-c</literal> or <literal>--clean</literal>
+ option when you invoke &SCons;,
+ and &SCons; removes the appropriate built files.
+ So if we build our example above
+ and then invoke <literal>scons -c</literal>
+ afterwards, the output on POSIX looks like:
+
+ </para>
+
+ <scons_example name="clean">
+ <file name="SConstruct">
+ Program('hello.c')
+ </file>
+ <file name="hello.c">
+ int main() { printf("Hello, world!\n"); }
+ </file>
+ </scons_example>
+
+ <scons_output example="clean" os="posix">
+ <command>scons</command>
+ <command>scons -c</command>
+ </scons_output>
+
+ <para>
+
+ And the output on Windows looks like:
+
+ </para>
+
+ <scons_output example="clean" os="win32">
+ <command>scons</command>
+ <command>scons -c</command>
+ </scons_output>
+
+ <para>
+
+ Notice that &SCons; changes its output to tell you that it
+ is <literal>Cleaning targets ...</literal> and
+ <literal>done cleaning targets.</literal>
+
+ </para>
+
+ </section>
+
+ <section>
<title>The &SConstruct; File</title>
<para>
@@ -347,7 +399,7 @@
</para>
<programlisting>
- Program('program', Split('main.c file1.c file2.'))
+ Program('program', Split('main.c file1.c file2.c'))
</programlisting>
<para>
@@ -381,7 +433,7 @@
</para>
<programlisting>
- list = Split('main.c file1.c file2.')
+ list = Split('main.c file1.c file2.c')
Program('program', list)
</programlisting>
@@ -422,7 +474,7 @@
</para>
<programlisting>
- list = Split('main.c file1.c file2.')
+ list = Split('main.c file1.c file2.c')
Program(target = 'program', source = list)
</programlisting>
@@ -435,7 +487,7 @@
</para>
<programlisting>
- list = Split('main.c file1.c file2.')
+ list = Split('main.c file1.c file2.c')
Program(source = list, target = 'program')
</programlisting>