summaryrefslogtreecommitdiffstats
path: root/doc/user/depends.in
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2008-08-24 22:37:45 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2008-08-24 22:37:45 (GMT)
commit971d0847a90af1327b9001501731f6720f056774 (patch)
tree3671e52d55bbac0d9f44a620b0dd6f5201bc552b /doc/user/depends.in
parent539362c833c966a5f55aac4a222fce6313bccec5 (diff)
downloadSCons-971d0847a90af1327b9001501731f6720f056774.zip
SCons-971d0847a90af1327b9001501731f6720f056774.tar.gz
SCons-971d0847a90af1327b9001501731f6720f056774.tar.bz2
Fix for bug #243 - document how to use Ignore() to remove a target from
being built as default.
Diffstat (limited to 'doc/user/depends.in')
-rw-r--r--doc/user/depends.in28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/user/depends.in b/doc/user/depends.in
index 1309807..8cd9970 100644
--- a/doc/user/depends.in
+++ b/doc/user/depends.in
@@ -1520,6 +1520,34 @@
Ignore(hello, '/usr/include/stdio.h')
</programlisting>
+ <para>
+ &Ignore; can also be used to prevent a generated file from being built
+ by default. This is due to the fact that directories depend on
+ their contents. So to ignore a generated file from the default build,
+ you specify that the directory should ignore the generated file.
+ Note that the file will still be built if the user specifically
+ requests the target on scons command line, or if the file is
+ a dependency of another file which is requested and/or is built
+ by default.
+ </para>
+
+ <scons_example name="ignore_explicit">
+ <file name="SConstruct" printme="1">
+ hello_obj=Object('hello.c')
+ hello = Program(hello_obj)
+ Ignore('.',[hello,hello_obj])
+ </file>
+ <file name="hello.c">
+ #include "stdio.h"
+ int main() { printf("Hello!\n"); }
+ </file>
+ </scons_example>
+
+ <scons_output example="ignore_explicit" os="posix">
+ <scons_output_command>scons -Q</scons_output_command>
+ <scons_output_command>scons -Q hello</scons_output_command>
+ <scons_output_command>scons -Q hello</scons_output_command>
+ </scons_output>
</section>
<section>