Shell scripts, build rules
Shell scripts, build rules
- Subject: Shell scripts, build rules
- From: Glen Low <email@hidden>
- Date: Sat, 22 Nov 2003 16:14:25 +0800
Dear All,
I've done some experiments with Xcode shell scripts and build rules and
since I haven't seen any of this info on the mailing list or on the
web, I thought I'd share them in the hopes of someone avoiding tearing
their hair out.
1. In a native target, shell scripts *always* seem to be executed last,
even if you put them first in the phase ordering. I originally thought
they never got executed, but that was because the Sources build phase
errored and so it never got to the Shell Script phase.
2. In the info of a target, you can create a custom build rule for
particular file extensions, which seem to be run using the sh shell.
For build rules there are some extra undocumented (?) environment
variables, namely INPUT_FILE_BASE, INPUT_FILE_DIR, INPUT_FILE_NAME,
INPUT_FILE_PATH, INPUT_FILE_SUFFIX which you can use in the usual
fashion in the script. The output file "spec" should probably use these
so that Xcode knows when the output file is stale and requires your
script to rebuild it.
3. Note that removing a custom build rule usually results in an error
or crash; if it's an error at least it will be done.
Hopefully this will resolve the yacc compiling bug (have yet to test
it) and in any case I can't use the canned script Xcode uses.
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
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.