Eclipse has a versioning preprocessor plugin. It's like a preprocessor who's only commands are #define and #ifdef
However I wanted something more myself. I don't know how to use Ant, but I did just manage to get the C preprocessor working in Eclipse on windows for java, using the non-Ant Builders and some glue in Ruby. I wanted it for an android project, maybe for similar reasons to why you would want it for Blackberry.
Since I was looking for an answer on Stackoverflow before I rolled my own and didn't find one, I'm copying my post into a few questions like this one:
https://stackoverflow.com/a/10497206/1137626