title: How can I run custom tools from a premake build script?
body: <p>I'm using <a href="https://code.google.com/p/protobuf/" rel="noreferrer">protocol buffers</a> for data serialization in my C++ application. I would like to add the invokation of the <code>protoc</code> code generator in my <a href="http://industriousone.com/premake" rel="noreferrer">premake</a> build script (thus ensure the up-to-date state of the generated classes and avoid the need to store generated source under version control). </p>
  
  <p>Even their <a href="http://industriousone.com/faqs#external_tools" rel="noreferrer">FAQ</a> has a question and answer about this, but the answer is very incomplete for me. Having the ability to call any lua function is great, but where exactly do I put that call? I need to run the protoc compiler before building either the application or the unit tests. </p>