Post build stage?

Added by David Cowan over 1 year ago

Using the C/C++ Module framework, what's the easiest way of adding a post-build stage?


Replies (3)

RE: Post build stage? - Added by Joshua Jensen over 1 year ago

Jam uses a dependency graph to determine build order, so you parent nodes to children you want built first.

Because post-build can mean any number of things, I'll assume you want to build something after an executable. Do something like:

local executableTarget = [ C.Application YourExecutable : your.c files.c ] ;

Depends YourExecutable : YourPostBuildTask : $(executableTarget) ;

Then fill in the build settings for YourPostBuildTask.

I can help with the details, if you'd like.

RE: Post build stage? - Added by David Cowan over 1 year ago

Thanks Joshua.

I'll try that shortly... I found that I needed to do some extra steps after the executable was built for the Wii, when targeting WiiWare builds.
These involve compressing and packaging up the executable into a new container file, and linking in some additional resources supplied by Nintendo.

I wasn't sure how to tie in a post-build dependency, so that I could fire off some additional actions to perform these post-compile/link steps.

RE: Post build stage? - Added by Joshua Jensen over 1 year ago

Turns out, there is something in there just for that. See rule C._ApplicationFromObjects_PostBuild in xbox360-vc.jam for an example.

(1-3/3)