Re: Problem with dependency checking in Run Script phase -- again
Re: Problem with dependency checking in Run Script phase -- again
- Subject: Re: Problem with dependency checking in Run Script phase -- again
- From: Gunnar Proppe <email@hidden>
- Date: Thu, 9 Nov 2006 13:01:58 -0800
On Feb 1, 2006, at 8:47 AM, Adam Kocoloski wrote:
Ok, saw this message from Jan 11:
http://www.cocoabuilder.com/archive/message/xcode/2006/1/11/2704
Edouard suggested that the problem was perhaps restricted to Jam-
based targets. Just wanted to point out that mine is a native C++
command-line tool. Thanks,
Adam
I'm still having this problem with Xcode 2.4. This is also with a
native C++ app.
I thought I'd found a clever way around this problem like so:
for ((i=0; i < SCRIPT_INPUT_FILE_COUNT ; i++))
do
# XCode doesn't provide the input files as an array. This ugly
eval thing gets the value of the
# indexed file by creating a new bash variable, eg.
SCRIPT_INPUT_FILE_0 and evaluating it.
inputFile=`eval echo '$SCRIPT_INPUT_FILE_'$i`
outputFile=`eval echo '$SCRIPT_OUTPUT_FILE_'$i`
# "-nt" means "newer than." This seems to work even if outputFile
doesn't exist.
if [ $inputFile -nt $outputFile ]
then
echo "Running tool on $inputFile."
${toolpath}/tool "${inputFile}" -o "${outputFile}"
fi
done
In fact, I only see "Running tool..." when the input file is newer.
However, it seems that the very fact that Xcode is (erroneously)
running the script phase makes it think it needs to recompile the
source files that are generated by "tool." I've verified that their
mod times haven't changed since yesterday, and have done a Clean on
my project.
I thought this might have to do with using a project that's been
upgraded through many revisions of Xcode (since 1.x), but it's still
happening with a newly created project.
The input and output files are both above the path of the Xcode
project. This sort of thing used to cause other problems with Xcode,
so maybe it's still a factor in this.
A fix for this bug would be much appreciated.
Gunnar
NOTICE: This electronic mail message and its contents, including any attachments hereto (collectively, "this e-mail"), is hereby designated as "confidential and proprietary." This e-mail may be viewed and used only by the person to whom it has been sent and his/her employer solely for the express purpose for which it has been disclosed and only in accordance with any confidentiality or non-disclosure (or similar) agreement between TEAC Corporation or its affiliates and said employer, and may not be disclosed to any other person or entity.
_______________________________________________
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