• 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: lex: how to override Xcode's output file choice?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lex: how to override Xcode's output file choice?


  • Subject: Re: lex: how to override Xcode's output file choice?
  • From: Philip Aker <email@hidden>
  • Date: Tue, 22 Sep 2009 20:41:28 -0700

On 2009-09-22, at 18:35:16, Dan Caugherty wrote:

I'd like (f)lex to produce C++ (yes, the evil FlexLexer option.. I know, it's frightful, but I have my reasons). But Xcode insists on invoking lex with
-o$(DERIVED_SOURCES)/lex.yy.c
as the final flag in the command line.

All of my attempts to override this setting via lex build flag settings in the project have failed. Rather than hack together a script to move this file to lex.myfunkylexer.cpp, how can I tell Xcode to stop adding its own -o option? (I hate it when tools try too hard to be helpful.)

I'm sure there's an easier way to do this, but finding it has been an adventure. Would anyone here know?

I think you can handle this by creating a build rule for each target that needs your custom options.


1. Double-click on your target.
2. Click on the Rules tab.
3. Scroll down to the "System Lex rule" (it's near the bottom on my setup).
4. Choose "Custom script:" from the "using:" popup.



Philip Aker echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.

_______________________________________________
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


References: 
 >lex: how to override Xcode's output file choice? (From: Dan Caugherty <email@hidden>)

  • Prev by Date: Re: Different library per build configuration?
  • Next by Date: Re: XIB & 10.4
  • Previous by thread: lex: how to override Xcode's output file choice?
  • Next by thread: lex: Found my answer, never mind
  • Index(es):
    • Date
    • Thread