• 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: Run script output files not being compiled
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run script output files not being compiled


  • Subject: Re: Run script output files not being compiled
  • From: "Mills, Steve" <email@hidden>
  • Date: Tue, 03 Jun 2014 19:50:04 +0000
  • Thread-topic: Run script output files not being compiled

On Jun 3, 2014, at 14:39:53, Fritz Anderson <email@hidden> wrote:

> On 2 Jun 2014, at 11:37 PM, Joar Wingfors <email@hidden> wrote:
>
>> I'm pretty sure that you can't generate code to be compiled during the build, and have it picked up during the same build. At the very least not from script build phases. I believe that Lex/Yacc is special cased to work, but I'm not sure what the rules are.
>
> My inference — never contradicted since Xcode 2 at least — is that the build system snapshots the dependency tree at the beginning of the build, and doesn’t pick up any changes that aren’t special-cased in the standard build flows:
>
> A newly-generated object file triggers the link dependency (standard flow), but if you have a special tool that generates intermediates, they won’t be detected. What I’ve had to do for .lemon files for the Lemon parser generator is to let lemon run in a run-script phase every time*, and have the subsequent compile phase pick up the products.
>
> * (It’s actually helpful in this case that the input/output dependencies you can put on script phases are ignored — the build system runs the phase regardless, and always assumes the output intermediates are new.
>
> (Something I should investigate is whether the build system actually detects that the script outputted something, and correctly triggers the dependency on-the-fly, but that’s not my impression.)
>
> You do have a chicken-and-egg problem on the first build: If the intermediates generated by the script don’t already exist, the build system won’t (ever?) see them.

But like I already suggested, if you have empty placeholder source files already in the project and in the Compile build phase, then the script can simply add the text to those files and then they should compile. No?

--
Steve Mills
office: 952-818-3871
home: 952-401-6255


 _______________________________________________
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: Run script output files not being compiled
      • From: Roland King <email@hidden>
References: 
 >Run script output files not being compiled (From: Rick Mann <email@hidden>)
 >Re: Run script output files not being compiled (From: Joar Wingfors <email@hidden>)
 >Re: Run script output files not being compiled (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Run script output files not being compiled
  • Next by Date: Re: swift and objective-c
  • Previous by thread: Re: Run script output files not being compiled
  • Next by thread: Re: Run script output files not being compiled
  • Index(es):
    • Date
    • Thread