• 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
Derived file dependency tracking?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Derived file dependency tracking?


  • Subject: Derived file dependency tracking?
  • From: Ethan Tira-Thompson <email@hidden>
  • Date: Tue, 30 Jun 2009 12:10:39 -0400

I'm curious if these issues have been resolved:
http://lists.apple.com/archives/xcode-users/2003/Dec/msg00461.html
http://lists.apple.com/archives/xcode-users/2004/Jun/msg00023.html

Currently, with Xcode 3.1.2 it would appear not. In my case, we have a little state machine generation script which will take a '.fsm' C++ header/source file, strip out a demarcated section and replace it with corresponding C++ code, saving as '.h' or '.cc' in DERIVED_FILE_DIR. Often, the C++ class is essentially a thin wrapper around the state machine it entails, so only a '.h.fsm' is used.

The problem is that the 'normal' source files which #include the derived headers are not updated when the '.fsm' is modified.

*Method A*: I used a custom build rule—this *almost* works, in that in the first build the .fsm is processed into the .h, and then on the *second* build the dependent source files will be recompiled. (yes, the output file is specified in the build rule)

Other nuisances with this method are that when adding files to the project, the .fsm defaults to 'text' type, so I have to "get info", switch it to 'sourcecode.cpp', and then enable it for each target. (when adding the file, since it defaults to text, it can't initially be added to targets). This is a rather tedious process, and becomes a problem for training new developers, where the whole point of the .fsm thing was to streamline the process, not make it harder...

*Method B*: add a "run script" build phase, which executes a Makefile, again dumping products into DERIVED_FILE_DIR. In this case, dependent source files are *never* recompiled, so it's completely broken. Also, I'm guessing .cc.fsm files wouldn't be noticed in order to further compile them into .o files. (no 'input' or 'output' files are specified for the "run script" phase, although from a test this doesn't seem to matter for dependency purposes, just triggers when to run the script. And I wouldn't want to have to manually maintain a list of all .fsm files here anyway.)

So what gives? This seems like a fundamental breakage for any kind of source code generation. My Makefile build system uses gcc -M and friends to generate dependency files after doing the .fsm parsing, which handle this situation. Is Xcode not doing something similar?

Thanks,
 -Ethan _______________________________________________
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: Derived file dependency tracking?
      • From: Ethan Tira-Thompson <email@hidden>
  • Prev by Date: Re: Interface Builder crash on startup
  • Next by Date: Re: Interface Builder crash on startup
  • Previous by thread: Re: Interface Builder crash on startup
  • Next by thread: Re: Derived file dependency tracking?
  • Index(es):
    • Date
    • Thread