diff options
author | Luca Falavigna <dktrkranz@debian.org> | 2014-04-26 15:11:58 +0200 |
---|---|---|
committer | Luca Falavigna <dktrkranz@debian.org> | 2014-04-26 15:11:58 +0200 |
commit | 140d836e9cd54fb67b969fd82ef7ed19ba574d40 (patch) | |
tree | 0df3e32ee39603d43f9b90fd2f2e1f7cce4249d4 /doc/user/builders-commands.xml | |
parent | cb3425abe0bc2d05caf401ca24b82a25a81f009d (diff) |
Imported Upstream version 2.3.1upstream/2.3.1
Diffstat (limited to 'doc/user/builders-commands.xml')
-rw-r--r-- | doc/user/builders-commands.xml | 80 |
1 files changed, 57 insertions, 23 deletions
diff --git a/doc/user/builders-commands.xml b/doc/user/builders-commands.xml index 0d3918d..5e179a4 100644 --- a/doc/user/builders-commands.xml +++ b/doc/user/builders-commands.xml @@ -1,6 +1,28 @@ +<?xml version='1.0'?> +<!DOCTYPE sconsdoc [ + <!ENTITY % scons SYSTEM "../scons.mod"> + %scons; + + <!ENTITY % builders-mod SYSTEM "../generated/builders.mod"> + %builders-mod; + <!ENTITY % functions-mod SYSTEM "../generated/functions.mod"> + %functions-mod; + <!ENTITY % tools-mod SYSTEM "../generated/tools.mod"> + %tools-mod; + <!ENTITY % variables-mod SYSTEM "../generated/variables.mod"> + %variables-mod; + +]> + +<chapter id="chap-builders-commands" + xmlns="http://www.scons.org/dbxsd/v1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0/scons.xsd scons.xsd"> +<title>Not Writing a Builder: the &Command; Builder</title> + <!-- - Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation + Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -69,10 +91,15 @@ </para> - <programlisting> - env = Environment() - env.Command('foo.out', 'foo.in', "sed 's/x/y/' < $SOURCE > $TARGET") - </programlisting> + <scons_example name="builderscommands_ex1"> + <file name="SConstruct" printme="1"> +env = Environment() +env.Command('foo.out', 'foo.in', "sed 's/x/y/' < $SOURCE > $TARGET") + </file> + <file name="foo.in"> +foo.in + </file> + </scons_example> <para> @@ -83,10 +110,9 @@ </para> - <screen> - % <userinput>scons -Q</userinput> - sed 's/x/y/' < foo.in > foo.out - </screen> + <scons_output example="builderscommands_ex1" suffix="1"> + <scons_output_command>scons -Q</scons_output_command> + </scons_output> <para> @@ -105,13 +131,18 @@ </para> - <programlisting> - env = Environment() - def build(target, source, env): - # Whatever it takes to build - return None - env.Command('foo.out', 'foo.in', build) - </programlisting> + <scons_example name="builderscommands_ex2"> + <file name="SConstruct" printme="1"> +env = Environment() +def build(target, source, env): + # Whatever it takes to build + return None +env.Command('foo.out', 'foo.in', build) + </file> + <file name="foo.in"> +foo.in + </file> + </scons_example> <para> @@ -119,10 +150,9 @@ </para> - <screen> - % <userinput>scons -Q</userinput> - build(["foo.out"], ["foo.in"]) - </screen> + <scons_output example="builderscommands_ex2" suffix="1"> + <scons_output_command>scons -Q</scons_output_command> + </scons_output> <para> @@ -132,9 +162,11 @@ </para> - <programlisting> - env.Command('${SOURCE.basename}.out', 'foo.in', build) - </programlisting> + <scons_example name="builderscommands_ex3"> + <file name="SConstruct" printme="1"> +env.Command('${SOURCE.basename}.out', 'foo.in', build) + </file> + </scons_example> <para> @@ -144,3 +176,5 @@ </para> + +</chapter> |