summaryrefslogtreecommitdiffstats
path: root/doc/user/simple.sgml
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.sgml
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.sgml')
-rw-r--r--doc/user/simple.sgml77
1 files changed, 73 insertions, 4 deletions
diff --git a/doc/user/simple.sgml b/doc/user/simple.sgml
index 02a57ef..4309837 100644
--- a/doc/user/simple.sgml
+++ b/doc/user/simple.sgml
@@ -118,6 +118,75 @@
</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>
+
+
+
+ <literallayout>
+ % <userinput>scons</userinput>
+ scons: Reading SConscript files ...
+ scons: done reading SConscript files.
+ scons: Building targets ...
+ cc -c -o hello.o hello.c
+ cc -o hello hello.o
+ scons: done building targets.
+ % <userinput>scons -c</userinput>
+ scons: Reading SConscript files ...
+ scons: done reading SConscript files.
+ scons: Cleaning targets ...
+ Removed hello.o
+ Removed hello
+ scons: done cleaning targets.
+ </literallayout>
+
+ <para>
+
+ And the output on Windows looks like:
+
+ </para>
+
+ <literallayout>
+ C:\><userinput>scons</userinput>
+ scons: Reading SConscript files ...
+ scons: done reading SConscript files.
+ scons: Building targets ...
+ cl /nologo /c hello.c /Fohello.obj
+ link /nologo /OUT:hello.exe hello.obj
+ scons: done building targets.
+ C:\><userinput>scons -c</userinput>
+ scons: Reading SConscript files ...
+ scons: done reading SConscript files.
+ scons: Cleaning targets ...
+ Removed hello.obj
+ Removed hello.exe
+ scons: done cleaning targets.
+ </literallayout>
+
+ <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>
@@ -352,7 +421,7 @@
</para>
<programlisting>
- Program('program', Split('main.c file1.c file2.'))
+ Program('program', Split('main.c file1.c file2.c'))
</programlisting>
<para>
@@ -386,7 +455,7 @@
</para>
<programlisting>
- list = Split('main.c file1.c file2.')
+ list = Split('main.c file1.c file2.c')
Program('program', list)
</programlisting>
@@ -427,7 +496,7 @@
</para>
<programlisting>
- list = Split('main.c file1.c file2.')
+ list = Split('main.c file1.c file2.c')
Program(target = 'program', source = list)
</programlisting>
@@ -440,7 +509,7 @@
</para>
<programlisting>
- list = Split('main.c file1.c file2.')
+ list = Split('main.c file1.c file2.c')
Program(source = list, target = 'program')
</programlisting>