[Mesa-dev] [PATCH] android: vulkan: add support for libmesa_vulkan_{util, wsi}

Emil Velikov emil.l.velikov at gmail.com
Wed Mar 1 12:12:17 UTC 2017


On 1 March 2017 at 00:40, Eric Engestrom <eric at engestrom.ch> wrote:
> On Tuesday, 2017-02-28 18:18:01 +0000, Emil Velikov wrote:
>> On 28 February 2017 at 16:05, Eric Engestrom <eric.engestrom at imgtec.com> wrote:
>>
>> >> > The quick and dirty fix is to add a rule forcing the serialisation, like
>> >> > this:
>> >> >   util/vk_enum_to_str.c: util/vk_enum_to_str.h
>> >> > This fixes the race condition, but still writes both files twice for no
>> >> > reason.
>> >> >
>> >> Are you sure that will generate them twice - can you elaborate a bit ?
>> >
>> > You can try it yourself with this makefile:
>> > ----8<----
>> > all: foo bar
>> > foo bar:
>> >         echo $@
>> > ---->8----
>> >
>> > $ make
>> > echo foo
>> > foo
>> > echo bar
>> > bar
>> >
>> > It runs both targets, regardless of the fact they have the same rule.
>> >
>> I was wondering about the "foo.c: bar.h" case, like below.
>
> Oh sorry, I misread that.
>
>>
>> ----8<----
>> all: foo.c bar.h
>>
>> bar.h:
>> @echo $@
>>
>> foo.c: bar.h
>> ---->8----
>>
>> $make -f foo
>> bar.h
>>
>> It does it once on my end. Perhaps I'm missing something ?
>
> Yeah that works, since only one of the target has an actual build rule.
>
> Still has the downside of having to figure out the target filename again
> in the script instead of just passing it through, but I guess I'm the
> only one who cares about that kind of things ;P
>
Just clicked what you meant. IMHO the nicer fix is to use a
-o/--header-file -o/--defines combo like lex/yacc.

I'm thinking that sorting these in one go would be better.

> Anyway, like I said: any of these solutions are good enough for me.
>
Agreed, I've just applied minor polish and giving it a test... it just case ;-)

-Emil


More information about the mesa-dev mailing list