scons: Add a env.CodeGenerate method to simplify code generation via python scripts.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Thu, 3 Jul 2008 03:42:23 +0000 (12:42 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Thu, 3 Jul 2008 06:06:24 +0000 (15:06 +0900)
commit27d8d6f44faa61a61c330d032111eee64dd8b8c7
treedaa0db92b6ce952196acfc84a7a4e78277a33d65
parent1ca23061478868d61b9b2e6a30367e8e1de4a456
scons: Add a env.CodeGenerate method to simplify code generation via python scripts.

env.CodeGenerate(
target = 'my_source.c',
script = 'my_generator.py',
source = ['input.txt', 'another.txt'],
command = 'python $SCRIPT $SOURCE > $TARGET'
)

It will take care generating all appropriate dependencies, including any
module imported by the generator script, and the respective .pyc file
side effects.
scons/gallium.py