• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Shell scripts, build rules
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Shell scripts, build rules
      • From: Scott Tooker <email@hidden>
    • Re: Shell scripts, build rules
      • From: Dario Accornero <email@hidden>
  • Prev by Date: Re: Groups, shell scripts, yacc
  • Next by Date: Re: Shell scripts, build rules
  • Previous by thread: Copying fails in deployment build
  • Next by thread: Re: Shell scripts, build rules
  • Index(es):
    • Date
    • Thread