Build and environment variables are not accessible from pre/post action scripts

Number:rdar://9111439 Date Originated:09/03/2011
Status:Closed/Dupe Resolved:Xcode 4.1
Product:Xcode 4 Product Version:4.0
Classification:Enhancement Reproducible:Always
If I want to run for instance, a shell script that I have stored in ${SRCROOT}/Scripts/ from a pre or post action, I have no way of determining the path to SRCROOT. Run Script *build phases* can use build settings/environment variables, e.g. the old unit test run script phase:

# Run the unit tests in this test bundle.

No such variables are accessible from the pre and post actions.

Expected Results:
Pre/Post action scripts should work exactly the same as Run Script build phases, with all variables available.


This appears to have been fixed in Xcode 4.1 (available with the Lion developer preview). Under NDA, so can't really elaborate, but you get the idea.

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!