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:28:31 -0700
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