开发者

Replacing Xcode's preprocessor with a custom process

I have a need to look at the files Xcode will compile before the preprocessor gets a stab at them. In short, I need to stick a preprocessor in front of the preprocessor.

All the Google searching has netted me nada when it comes to details on how to run the default Xcode build process for C-based files after modifying the build rule for "C source files". Xcode seems to 开发者_运维知识库call a process (shell script? voodoo chant?) called "CompileC" but I cannot find it to call it myself after I'm done with the source file.

Any ideas? For the curious, I need to modify certain macros in very specific situations (depending on the source file's name or the build date, for example). And there doesn't appear to be a clever way to do: #ifdef filename="bobsyeruncle.m"


It looks like a build-rule script would work: http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/200-Build_Phases/bs_build_phases.html#//apple_ref/doc/uid/TP40002690-CJAEACAD

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜