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?
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