Re: Modifying Xcode's preprocessing routine
Re: Modifying Xcode's preprocessing routine
- Subject: Re: Modifying Xcode's preprocessing routine
- From: Jason Foreman <email@hidden>
- Date: Fri, 30 Oct 2009 14:48:32 -0500
On Oct 30, 2009, at 8:08 AM, Jim Turner wrote:
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 and mailing lists 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. Ideally, I'd love to run a very small perl script
that would take the original source file, diddle as needed sending the
output to a temp file, the have CompileC use that source file instead
of the original.
Any ideas? I asked this question on Stack Overflow and got a handful
of blank stares. I didn't think this would be such a difficult problem
to solve.
One thing you might try is to create your input file with a custom
extension (e.g., foo.cin), then use a build rule that does your
preprocessing on that file and outputs a .c file in $
(DERIVED_FILES_DIR). The derived file will then be compiled normally
by Xcode. I think it will be important to use a custom extension
rather than modifying the default rule for "C source files" to get it
working as you want.
Jason
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden