• 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
Pass a C option based on command-line output?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pass a C option based on command-line output?


  • Subject: Pass a C option based on command-line output?
  • From: Daniel Jalkut <email@hidden>
  • Date: Sat, 7 Jan 2006 14:32:50 -0500


What's the easiest way to convince Xcode to set a command-line option with the value of a shell command's output?


Specifically, I'm porting an app to Xcode which is currently built with a Makefile. The app passes a "-D HOSTNAME=`hostname`" argument in one of the compile rules. I've tried using `hostname` notation inside Xcode's "Other C Flags" build setting, but the back-tick magic doesn't work.

I'm wondering if there's a general way of invoking a shell tool to populate a build setting or, alternatively, if there's specifically an existing Xcode build variable that represents the current host name?

Daniel
_______________________________________________
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: Pass a C option based on command-line output?
      • From: Chris Espinosa <email@hidden>
  • Prev by Date: Re: Xcode & Visual C++
  • Next by Date: Re: Xcode & Visual C++
  • Previous by thread: Re: Removing Xcode
  • Next by thread: Re: Pass a C option based on command-line output?
  • Index(es):
    • Date
    • Thread