Re: Passing the result of one build phase to another
Re: Passing the result of one build phase to another
- Subject: Re: Passing the result of one build phase to another
- From: Wim Lewis <email@hidden>
- Date: Tue, 18 Oct 2005 14:19:12 -0700
On 17 Oct, 2005, at 11:16 PM, James Bucanek wrote:
Wim Lewis wrote on Monday, October 17, 2005:
I'd like to have a shell script phase which generates a .c file
(containing information about the build environment) which then gets
compiled and linked into the project. The shell script should run
every time the project is built. Is there a way to do this using
Xcode?
Can your script be a build rule rather than a custom build phase?
The problem with that is that it won't necessarily be run every time
the project is built. What I'm looking for is something along the
lines of a "phony target" in a Makefile.
My best approach so far is to have a separate target in the project
which generates the file and places it in $SHARED_DERIVED_FILE_DIR.
The real target then includes this file in its list of sources. The
file has to be generated by a separate target, or else Xcode will
choke the first time the project is built from a clean state, when
the derived file doesn't exist. And the build phase that produces the
file must *not* list its output file under "Output Files", or Xcode
will skip running the phase once the file has been created the first
time. This is slightly kludgy but seems to work.
_______________________________________________
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