diff options
author | Steven Knight <knight@baldmt.com> | 2002-02-20 19:35:45 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-02-20 19:35:45 (GMT) |
commit | f4ee118fe5616605078a067e3ac0a45cad49adfd (patch) | |
tree | fd8cddf8b0fef25a3eadd1a977db0e81ba6099d9 /doc | |
parent | 356fbb160d2cce263321e63789294b9d3a659996 (diff) | |
download | SCons-f4ee118fe5616605078a067e3ac0a45cad49adfd.zip SCons-f4ee118fe5616605078a067e3ac0a45cad49adfd.tar.gz SCons-f4ee118fe5616605078a067e3ac0a45cad49adfd.tar.bz2 |
Add command generator function support. (Anthony Roach)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/man/scons.1 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/man/scons.1 b/doc/man/scons.1 index 4d1ea77..78bf54b 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -1170,6 +1170,31 @@ Specifies a builder to use when a source file name suffix does not match any of the suffixes of the builder. Using this argument produces a multi-stage builder. +.IP generator +A function that returns a list of command lines that will be executed to build +the target(s) from the source(s). The command lines must be returned as +lists, where the first element of the list is the executable, and the other +elements in the list are the arguments that will be passed to the +executable. The +.I generator +and +.I action +arguments must not both be used for the same Builder. The generator function +should take 3 arguments: +.I source +- a list of source nodes, +.I target +- a list of target nodes, +.I env +- the construction environment. Example: + +.ES +def g(env, source, target): + return [["gcc", "-c", "-o"] + target + source] + +b = Builder(name="Object", generator=g) +.EE + .SS Action Objects The Builder function will turn its |