diff options
author | Steven Knight <knight@baldmt.com> | 2004-04-04 04:01:53 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-04-04 04:01:53 (GMT) |
commit | 30f01a9a0339978e15115cd2ad8fd169d88e1ab1 (patch) | |
tree | 09d153a86945df53d71c32d53e865c6e2fd3c1b4 /doc/man/scons.1 | |
parent | e3395e16f968f033c77090aa8b4212c0f89ebf6a (diff) | |
download | SCons-30f01a9a0339978e15115cd2ad8fd169d88e1ab1.zip SCons-30f01a9a0339978e15115cd2ad8fd169d88e1ab1.tar.gz SCons-30f01a9a0339978e15115cd2ad8fd169d88e1ab1.tar.bz2 |
Allow a list of emitters to be called in sequence. (Chad Austin)
Diffstat (limited to 'doc/man/scons.1')
-rw-r--r-- | doc/man/scons.1 | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/doc/man/scons.1 b/doc/man/scons.1 index 0c46747..da35784 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -6261,12 +6261,12 @@ any of the suffixes of the builder. Using this argument produces a multi-stage builder. .IP emitter -A function to manipulate the target and source +A function or list of functions to manipulate the target and source lists before dependencies are established and the target(s) are actually built. .B emitter can also be string containing a construction variable to expand -to an emitter function, +to an emitter function or list of functions, or a dictionary mapping source file suffixes to emitter functions. (Only the suffix of the first source file @@ -6295,11 +6295,23 @@ def e(target, source, env): b = Builder("my_build < $TARGET > $SOURCE", emitter = e) -# Calling an emitter through a construction variable. +def e2(target, source, env): + return (target + ['bar.foo'], source + ['bar.src']) + +# Simple association of a list of emitter functions with a Builder. +b = Builder("my_build < $TARGET > $SOURCE", + emitter = [e, e2]) + +# Calling an emitter function through a construction variable. env = Environment(MY_EMITTER = e) b = Builder("my_build < $TARGET > $SOURCE", emitter = '$MY_EMITTER') +# Calling a list of emitter functions through a construction variable. +env = Environment(EMITTER_LIST = [e, e2]) +b = Builder("my_build < $TARGET > $SOURCE", + emitter = '$EMITTER_LIST') + # Associating multiple emitters with different file # suffixes using a dictionary. def e_suf1(target, source, env): |