Re: Run Script build phase to call genstrings only for Release config
Re: Run Script build phase to call genstrings only for Release config
- Subject: Re: Run Script build phase to call genstrings only for Release config
- From: Aaron Montgomery <email@hidden>
- Date: Tue, 18 Jul 2006 22:16:53 -0700
On Jul 18, 2006, at 9:50 PM, David Sinclair wrote:
I want to automate calling genstrings (to extract the strings for
localization) by adding a Run Script build phase in my Xcode projects.
However, I don't want genstrings to run when doing Debug builds.
But I'm happy for it to always run for Release builds.
I've created the Run Script build phase okay, but how can I make it
conditional on the active build configuration? Either in using
that build phase, or doing some evaluation within the script.
There are a large number of environment variables set by the compiler
before the script of a Run Script phase is executed. You can test
against these variables in the script. Check the build transcript
that appears as the middle pane in the Build Results window for a
list of all the variables you can test against. One of them is
something like ${CONFIGURATION} that should do exactly what you want.
if [ "${CONFIGURATION}" = 'Release' ]; then
#blah blah blah
fi
HTH,
Aaron
_______________________________________________
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