Injecting build variables into Xcode
Injecting build variables into Xcode
- Subject: Injecting build variables into Xcode
- From: email@hidden (Simon Fraser)
- Date: Wed, 7 Jul 2004 19:31:52 -0700 (PDT)
- Organization: AOL
I have a make-based build system that uses xcodebuild to
build some Xcode projects that build the UI portion of the app.
Our developers can also open those Xcode projects by hand, and
use them to build and debug the product.
The make-based part of the build puts some header files and
libs in directories whose names are only known at build time
(object dirs, or OBJDIRS), and whose names vary depending
on build settings.
Thus, the Xcode project has some per-build style variables:
OBJDIR=Darwin_D.OBJ
which gets used when setting include paths, for example:
../../../scrog/build/${OBJDIR}
Currently the setting for OBJDIR is predictable for debug and
non-debug build styles. However, I need to change this, and
somehow feed in the value for OBJDIR from outside.
With xcodebuild, this is easy:
xcodebuild -project=Foo.xcode OBJDIR=Darwin_mumble_D.OBJ
but if you open the project by hand and try to build, the
definition for the OBJDIR is missing.
So my question is how can I inject variable settings into
Xcode in a reliable way?
The documentation, at
<http://developer.apple.com/documentation/DeveloperTools/
Conceptual/Build_system/Build_Settings/Build_Settings.html>
suggests that I can do this via the Environment layer, but
I can't control the environment variables that are in
effect when a developer runs Xcode.
Is there any way to set a build setting from within a
Shell Script build phase, or something like that?
Simon
_______________________________________________
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.