One fairly common requirement in builds is to create some tool from source code, and then use that tool as part of the build to generate other files. This example shows how to do that, with thanks to Gary Oberbrunner. The tool to be generated is named mk_vds, and is built from the source file mk_vds.c. Then .txt input files are used by mk_vds to generate .vds files.
# This emitter will be used later by a Builder, and has an eXPlcit dependency on the mk_vds tool def mk_vds_emitter(target, source, env): env.Depends(target, mk_vds_tool) return (target, source)
# Create a builder (that uses the emitter) to build .vds files from .txt files # The use of abspath is so that mk_vds's directory doesn't have to be added to the shell path.