On Tuesday, 2017-02-28 18:18:01 +0000, Emil Velikov wrote: > On 28 February 2017 at 16:05, Eric Engestrom <eric.engest...@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 Anyway, like I said: any of these solutions are good enough for me. Cheers, Eric _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev