Re: Custom Build Phase Woes
Re: Custom Build Phase Woes
- Subject: Re: Custom Build Phase Woes
- From: Rush Manbert <email@hidden>
- Date: Thu, 25 Aug 2005 12:38:26 -0700
Okay, I tried using multiple Run Script phases and it fails the same
way. The only way that a Run Script phase seems to work in this
situation is when I do not specify any output files, so it just always
runs. Could there be a problem when none of the Run Script output files
appears explicitly in any of the other build phases? I'm generating a
header and a source, but I don't specify the source in the Compile
Sources build phase. (And how could I, when it doesn't exist until the
code generator runs? Adding files to a build phase doesn't seem to allow
for this case.)
Does anyone out there use YACC during a build phase to generate code? If
so, how do you do it?
- Rush
Rush Manbert wrote:
Sorry, I do mean "Run Script" build phase. There are two problems with
this approach:
1) If any one of my headers changes, the script will be run to update
all of them. This will force everything to recompile when it wasn't
necessary. I could get around this by adding a Run Script phase for
each of my header files that I use as a source for the code generator.
2) When I do this, then change one of my "source" headers and rebuild,
the build fails. The build details window says 'Native Build of Target
"Example" using Build Configuration "Debug"', but nothing else, and
the top pane in the build results window says 'Build failed for target
"Example"'
Maybe I should try the one-run-script-phase-per-source-header and see
if that works better.
- Rush
John Sheets wrote:
On Aug 25, 2005, at 12:35 PM, Rush Manbert wrote:
The files that are generated by the tool can be named anything.
They are only included into other files, so I could force them to
have special extensions. Maybe .toolname_h and .toolname_cpp for
example. Does this make it any easier to use one of the built in
methods? (I suspect not, but it's worth asking.)
The other alternative I can see is that I can write a Makefile that
does this, so that I don't regenerate code unless the relevant
header file changes, and run a make from a custom script build
phase. That seems sort of ironic...
By "custom build phase", do you mean a Run Script build phase? Did
you explicitly set up your input and output files at the bottom of
the General pane? Sorry, I haven't used it myself, but it sounds
like it's designed to do what you're asking for.
http://developer.apple.com/documentation/DeveloperTools/Conceptual/
XcodeUserGuide21/Contents/Resources/en.lproj/05_03_bs_build_phases/
chapter_31_section_9.html
"Xcode uses the input and output files to determine whether to run
the script, and to determine the order in which the script is
executed. Specifying input and output files ensures that Xcode runs
the script only when the modification date of any of the input files
is later than the modification date of any of the output files
(reducing the time it takes to build your product), and that the
files the script produces are included in the dependency analysis
the build system performs before building your product. If you
provide no outputs, Xcode runs the script every time you build the
target."
John
_______________________________________________
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
_______________________________________________
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