Re: Derived source compilation
Re: Derived source compilation
- Subject: Re: Derived source compilation
- From: Chris Espinosa <email@hidden>
- Date: Sat, 23 Jun 2007 16:25:04 -0700
On Jun 23, 2007, at 4:13 PM, Dair Grant wrote: - Add the list of files generated to the Output Files list of the Run Script phase.
... - Drag all the derived sources into you Groups and Files tree, don't copy,
These are the steps I'd like to avoid - they both require updating the project to reflect the current set of files-that-produce-extra-output, which means extra work to keep that in sync.
Yes, Xcode cannot determine project dependencies unless it has a list of files to look for.
One thing you can do (skanky as it is) is to include in your project just one generated master .c file in your project that includes the generated .c files. This has the downside of producing them as one compilation unit, which might have consequences, but will free you from having to update the project when the list of generated sources changes.
I can identify which files will generate additional source, and can invoke make to ensure I'm not rebuilding them unnecessarily, but I'd like to find a way to incorporate that source into the project without having to mess with the project itself.
This technique will be used for projects using a library that implements the code referenced by this dynamically-generated stuff.
Well, you could have your Run Script build phase just create a .a, and link to that.
I would like to pare it down to an "add a single Run Script phase to the project" step, so that those projects have as little extra configuration as possible (and don't need this double-build process: they just add a .foo, or a .h-with-a-special-macro, and any source produced by them gets built too).
The process I detail above is one-time setup if the list of files never changes, even though their content might.
The closest I can think of would be to generate a specially-named #include file, rewrite that to #include the extra .cpp/.h files, and have a requirement that this header gets pulled in once (e.g., by the source file that defines main).
Yeah, that's what I mention above.
Chris |
_______________________________________________
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