• 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: Custom build rule always rebuilding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom build rule always rebuilding


  • Subject: Re: Custom build rule always rebuilding
  • From: James Bucanek <email@hidden>
  • Date: Tue, 7 Mar 2006 09:48:14 -0700

Mark Lentczner wrote on Tuesday, March 7, 2006:

>We have a target that builds a static library with custom build rules
>for yacc and lex files.  These are script based build rules with
>specified output files.
>
>The problem is that they are always triggered on every build,
>rerunning yacc and lex, even when the .y and .l files are older than
>either the intermediates or the resulting object files.  Alas, this
>triggered recompilation, and the relinking of the library, which in
>turn causes the relinking of three applications.  Bah!
>
>The rules are:
>
>-- Yacc source files using Script --
>
>Process: Yacc source files
>using: Custom script:
>   /usr/bin/yacc -d -o "${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.y.cpp"
>"${INPUT_FILE_PATH}"
>with output files:
>   $(DERIVED_FILES_DIR)/$(INPUT_FILE_BASE).y.cpp
>   $(DERIVED_FILES_DIR)/$(INPUT_FILE_BASE).h

If I remember how yacc works (and it's been awhile, let me tell you), the -d option combined with the -o option will cause yacc to produce

    $(INPUT_FILE_BASE).y.h

not

    $(INPUT_FILE_BASE).h

Since no $(INPUT_FILE_BASE).h file ever exists, the rule gets triggered every time. Try changing the output file to $(DERIVED_FILES_DIR)/$(INPUT_FILE_BASE).y.h and see if that fixes it.

Since you don't actually process the .y.h file that get produced (i.e. the .h file is processed by any subsequent rules or build phases), you could probably get away with simply omitting the .h file from the list of output files.


James Bucanek
____________________________________________________________________
Author of Beginning Xcode                           ISBN: 047175479X
<http://www.beginningxcode.com/>           Available April 3rd, 2006
 _______________________________________________
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: Custom build rule always rebuilding
      • From: Mark Lentczner <email@hidden>
References: 
 >Custom build rule always rebuilding (From: Mark Lentczner <email@hidden>)

  • Prev by Date: Re: How to add resource files to "Build Resource Manager Resources" phase ?
  • Next by Date: Re: Monaco being displayed incorrectly?
  • Previous by thread: Custom build rule always rebuilding
  • Next by thread: Re: Custom build rule always rebuilding
  • Index(es):
    • Date
    • Thread