Here's the VERBATIM (inline-file) example from the Boost.Build v2 manual, but with the verbatim processor built from C++. The technique (explained to me by Valdimir Prus) is to add a feature with the command to be used, and supply that as a build flag. Here's verbatim.jam, which specifies how .verbatim files are handled:
import feature : feature ; import generators ; import toolset ; import type ; feature inline-binary : : free dependency ; toolset.flags verbatim.inline-file COMMAND <inline-binary> ; type.register VERBATIM : verbatim ; generators.register-standard verbatim.inline-file : VERBATIM : CPP ; actions verbatim.inline-file bind COMMAND { $(COMMAND) $(<) $(>) }
The main application Jamfile now looks like this:
import verbatim ; exe inliner : inliner.cpp ; exe application : application.cpp usage.verbatim : <inline-binary>inliner ;