Re: Yet another build styles question
Re: Yet another build styles question
- Subject: Re: Yet another build styles question
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 28 Oct 2003 19:30:35 -0500
Your explanation below is really very helpful. I wish I had understood this
a few months ago when I first started struggling with Xcode.
There is a crying need for a good tutorial on build settings (whether in
Project Builder or Xcode). The release notes are a good reference, but they
don't have nearly enough explanatory material to figure all this out --
unless you're already an Apple employee and have been working with it for a
few years.
I mean a tutorial that goes beyond the simplest case. For example, I compile
a reusable framework in one project, and I compile my app that uses the
framework in a separate project -- and I put all my build products in a
custom location to make it easy to run a script phase in the app that grabs
the framework and stuffs it into the app bundle. I use Mike Ferris's
recommendation for embedding frameworks in app bundles (in MOKit 2.7).
It was very hard to get this working right in Xcode, I think mainly because
I didn't understand how to combine the target's search path with the build
style's search path when I switched back and forth between my development
and my deployment build styles. The use of $(value), in particular, really
needs a much expanded explanation in the documentation.
There are lots of other places where adding a sentence to the documentation
would make a big difference to my productivity. For example, after
re-reading Mike Ferris's instructions for embedding frameworks in app
bundles, I noticed that he used the magic phrase "absolute path." I had
forgotten that the build setting in question (I forget which one it was, as
I type this) required an absolute path, and the documentation sure didn't
spell it out. I wasted a good 24 hours struggling with this.
on 03-10-28 7:06 PM, Scott Tooker at email@hidden wrote:
> The short answer is that $(value) is the new replacement for the +=
> behavior. It's more powerful than += since you can indicate where the
> value of the underlying build setting goes (with +=, the value you
> provided for the build setting was always appended to the end of the
> pre-existing build setting).
>
> So a little review here, Xcode (like Project Builder) has a series of
> "layers" for determining what get's overriden.
>
> Command Line
> Build Style
> Target
> Built-in Defaults
>
> (There are more layers, but the ones above cover the common cases).
>
> Layers that are higher in the stack override lower layers. So setting a
> build setting in a build style overrides the value set in the target.
>
> So if I have a build setting for "Header Search Paths" in the active
> target defined as "foo/bar" and the active build style defines "Header
> Search Paths" to be "/baz/bogos $(value) /fubar/grok", then the actual
> value for the build setting given this is "/baz/bogos foo/bar
> /fubar/grok".
>
> Note that there is a difference between the definition for a build
> setting at any given level, versus the actual value once all the layers
> take affect (in practice the vast majority of the time you have three
> cases, the definition at the target layer is not modified by higher
> layers, the build style defines a new build setting not present in the
> lower layers, or the build style modifies/replaces a definition from
> the lower layers).
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.