Derived source compilation
Derived source compilation
- Subject: Derived source compilation
- From: Dair Grant <email@hidden>
- Date: Sat, 23 Jun 2007 21:21:51 +0100
Hi,
Is it possible for source code generated by a Run Script phase
to be included automatically in the normal compile/link process?
I have a project with some .foo files, some regular .cpp/.h
files, and some .h files that contain special symbols. The .foo
files and the special .h files are run through preprocessors
that generate additional .cpp files, which I want to feed into
the build.
I don't want to use Build Rules to manage these, since those
have to be defined on a per-project basis (and they can't catch
the special .h files).
Instead I am using an external script which scans the source
tree, identifying any files that need special treatment. That
script then generates and executes a makefile, which
(re)generates whatever additional .cpp files are necessary.
My problem is how to get these .cpp files into the subsequent build.
I've seen references to DERIVED_FILES_DIR, with the implication
that source placed in there will somehow be sucked up into the
build; but so far the only approach I've found is to explicitly
add the intermediate files to the project.
I would prefer not to do that, as it means I have an extra
"build then add newly-created .cpp to project" step whenever I
add a .foo/special-.h to the project.
Is there any other way to get Xcode to incorporate this kind of
dynamically generated source into the build, short of having my
makefile doing the compiling as well then injecting the .o files
with -filelist?
I'd rather not take that approach, since ideally this source
would be built under the settings of the current build
configuration rather than hard-coding some build flags into the makefile.
-dair
___________________________________________________
email@hidden http://www.deathvalleycycle.com/
_______________________________________________
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