If I have an executable that generates an output from multiple files at a time –
generate_output -o a.out -f input1.txt input2.txt input3.txt
Is there a way to write such a custom builder for this?
What I have at the moment is –
builder = Builder(
action='generate_output -o $TARGET -f $SOURCE',
suffix='.out', src_suffix='.txt')
Then it only generates files in a sequence, which is not what I really wanted –
generate_output -o input1.out -f input1.txt
generate_output -o input2.out -f input2.txt
# etc...
Try using
$SOURCES, see Variable Substitution:It works for me in this simple example:
This will work as long as
generate_outputdoesn’t require-fto precede each input file.