• 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
Re: add system-wide custom build rules?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add system-wide custom build rules?


  • Subject: Re: add system-wide custom build rules?
  • From: Dirk Becker <email@hidden>
  • Date: Thu, 31 Dec 2009 11:51:41 +0100

On 30.12.2009, at 23:11, Jerry Krinock wrote:


On 2009 Dec 30, at 05:04, Dirk Becker wrote:


Is there a way to define those custom build rules system wide rather than per-target?


I believe so.  Have you read this?

http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/300-Build_Settings/bs_build_settings.html#/ /apple_ref/doc/uid/TP40002691-BACIFADG

In Fig. 3-1, note the "Application Settings layer". It's a misnomer -- I'd call it "User Settings layer".

Thanks for pointing out that document, but I do not understand how it may help with my problem.
I was talking about build rules, not build settings.


Select a target, get info. The third tab rider "Rules".
Those are used to associate a file extension with a specific translator/compiler.



Alternatively, is there any way to automate such work on XCode projects?
I had a look at the AppleScript Dictionary but found nothing but text rulers ...

You must be looking at the wrong dictionary. My Xcode AppleScript dictionary has 21 suites, starting with Standard Suite, including 8 Xcode xxx Suites, and ending with Type Definitions.

Again, filter for "rule".

There is also a command-line tool, xcodebuild, but it is rather limited. I use xcodebuild when possible; it's nicer because it runs in the background. But Xcode's AppleScript is more powerful than xcodebuild.

I know how to build, thanks again.
I am looking for a way to access the "target specific build rules" and their properties.


It would also be helpful if I could specify the default build phase per rule, currently added sources end up in "Copy Bundle Resources" rather than in "Compile Sources".

I believe they go into whatever group you have selected, but I'm not sure. Also, you can drag them in directly from Finder to wherever you want, instead of using the Add to Project menu item.

Here I am talking about build phases, not source file groups.
Add a custom build rule, such as "Source files with names matching *.sql" to invoke a custom shell script.
Then drag-drop any test.sql file into the sources tree. Any group there.
Expand the Sub-tree "Targets" - the red circle - and the target subtree. The gray squares with a triangle are build phases.
The newly added source has ended up within "Copy Bundle Resources" while it should go into "Compile Sources".


Dirk


_______________________________________________ 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
  • Follow-Ups:
    • Re: add system-wide custom build rules?
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: problem building projects with frameworks on the command line
  • Next by Date: Re: add system-wide custom build rules?
  • Previous by thread: Re: add system-wide custom build rules?
  • Next by thread: Re: add system-wide custom build rules?
  • Index(es):
    • Date
    • Thread