On Tue, Aug 4, 2009 at 4:52 PM, Evan Martin<[email protected]> wrote:
> [retry with proper email address, please respond to this one if you
> got the other one]
>
> On Tue, Aug 4, 2009 at 8:11 AM, Ben Laurie<[email protected]> wrote:
>> If you have a rule that produces multiple outputs, for example, the
>> one for src/chrome/app/theme/theme_resources.grd, the make build
>> currently works incorrectly if an error is encountered after the first
>> output is produced - subsequent makes do not try to rebuild the
>> outputs (e.g. try introducing a reference to a file that does not
>> exist in theme_resources.grd).
>>
>> I tried fixing it like this:
>>
>> Index: src/tools/gyp/pylib/gyp/generator/make.py
>> ===================================================================
>> --- src/tools/gyp/pylib/gyp/generator/make.py   (revision 568)
>> +++ src/tools/gyp/pylib/gyp/generator/make.py   (working copy)
>> @@ -685,7 +685,7 @@
>>         force_append = ' FORCE_DO_CMD'
>>       else:
>>         force_append = ' | FORCE_DO_CMD'
>> -    self.WriteLn('%s: %s%s%s' % (outputs[0], order_insert, ' '.join(inputs),
>> +    self.WriteLn('%s: %s%s%s' % (' '.join(outputs), order_insert, '
>> '.join(inputs),
>>                                  force_append))
>>     if actions:
>>       for action in actions:
>>
>> But this seems to cause other things to rebuild, too, so ... not sure
>> if this is the way to go. Before I delve deeper, anyone got a better
>> idea?
>
> There's a big comment block about five lines below where you made that
> modification talking about how to express multiple outputs to make,
> along with a link to a discussion of the problem in the make manual.

I know. That's where I got this fix from - it's one of the suggestions
in the manual :-)

What you currently do didn't seem to quite map to their suggestions, though.

> As for other ideas... hrm.  I guess we could go with yet another stampfile?
>
> Really, the problem is that you do not have all the dependencies in
> front of make.  The problem you're having is that files A and B
> conceptually depend on foobar.grd and C.png, while at the gyp level
> they just depend on foobar.grd.
> Now you modify foobar.grd to add a dependency on D.png.  We rebuild
> because foobar.grd was modified, then fail between A and B due to the
> missing D.png.  When you finally provide D.png, there is no new
> information in the dependency graph -- from make's perspective,
> there's no need to retry building A and B because the error you had
> last time should still exist now.

Well, no ... it should retry building B because it hasn't been built
yet. And, it should try whether I supply D.png or not. Which it does,
with my patch.

But, other things break :-(

>  You could just "touch foobar.grd" to work around it.

Indeed, that's what I've been doing.

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to