Re: Dependency analysis
Re: Dependency analysis
- Subject: Re: Dependency analysis
- From: Scott Tooker <email@hidden>
- Date: Sat, 20 Dec 2003 11:49:30 -0800
Please file a bug with a small test project if possible.
Scott
On Dec 19, 2003, at 9:13 PM, Glen Low wrote:
> Hi All,
>
> I managed to isolate the problem, so now I'd like to know whether it
> is a bug or a feature :-).
>
> To summarize the problem: if source file A generates derived source B,
> and derived source B is used by source file C, then Xcode fails to
> determine that, when source file A is changed, source file C needs to
> be recompiled too. Even though it correctly recreates derived source B
> as expected.
>
> E.g. a yacc compile scenario.
>
> The fix: add derived source file B to project itself. A project clean
> will remove the file but not the reference. Then Xcode correctly
> rebuilds source file C when source file A is updated.
>
> This sounds like a header map thing, you would think that since each
> build rule as applied to a source file would generate a known, fixed
> number of derived files, which should feed into the header map or
> further dependency analysis machinery... but well...
>
> On 20/12/2003, at 9:26 AM, Glen Low wrote:
>
>> Hi All,
>>
>> Just installed Xcode 1.1 (IDE, core & tool support versions 300.0)
>> and so far so good, like what I see so far.
>>
>> Now color me stupid, but in the release notes, under 'Rules' pane
>> fixes: The dependency graph for native targets is properly updated
>> when editing build rules that use custom scripts.
>>
>> So I create a test native target with two source files htmlparse.y
>> and htmllex.c.
>>
>> 1. htmllex.c has a #include of htmlparse.h that is supposed to be
>> generated by a custom script working on htmlparse.y.
>> 2. This is the rule I put in:
>>
>> Process: Source files with names matching: */htmlparse.y
>> Using: Custom script:
>>
>> cd $(DERIVED_FILE_DIR) && yacc -d $(INPUT_FILE_PATH) && sed
>> "s/yy/html/g" < y.tab.c > $(INPUT_FILE_BASE).c && sed "s/yy/html/g" <
>> y.tab.h > $(INPUT_FILE_BASE).h
>>
>> with output files:
>> $(DERIVED_FILE_DIR)/$(INPUT_FILE_BASE).c
>> $(DERIVED_FILE_DIR)/$(INPUT_FILE_BASE).h
>>
>> 3. I build the target. As expected htmllex.c and htmlparse.y are
>> yacc'ed and/or compiled.
>>
>> 4. If I now touch htmlparse.y, say by adding in a space and deleting
>> it, htmlparse.y is out of date w.r.t. htmlparse.h, which is out of
>> date w.r.t. to htmllex.c. But when I build only htmlparse.y gets
>> rebuilt, not htmllex.c!!
>>
>> There are no other htmlparse.h in the system, so I don't think the
>> header analysis system would be confused.
>>
>> Am I doing something wrong? How to fix?
>>
>> Cheers, Glen Low
>>
>>
>> ---
>> pixelglow software | simply brilliant stuff
>> www.pixelglow.com
>>
>> P.S. Thanks Xcode developers for fixing the Yacc build rule bug. Now
>> if only the script rules were fixed too.
>> _______________________________________________
>> xcode-users mailing list | email@hidden
>> Help/Unsubscribe/Archives:
>> http://www.lists.apple.com/mailman/listinfo/xcode-users
>> Do not post admin requests to the list. They will be ignored.
>>
>>
> Cheers, Glen Low
>
>
> ---
> pixelglow software | simply brilliant stuff
> www.pixelglow.com
> _______________________________________________
> xcode-users mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/xcode-users
> Do not post admin requests to the list. They will be ignored.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.