]> xenbits.xensource.com Git - xen.git/commit
libs/util: Fix parallel build between flex/bison and CC rules
authorAnthony PERARD <anthony.perard@citrix.com>
Thu, 9 Feb 2023 16:14:48 +0000 (16:14 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 9 Feb 2023 18:26:17 +0000 (18:26 +0000)
commitbf652a50fb3bb3b1b3d93db6fb79bc28f978fe75
tree1c88c469d6646ad7a991002a34bc2e96215227c7
parent52493ec3e32a6e631b3ae3571db7ed41f10d9b06
libs/util: Fix parallel build between flex/bison and CC rules

flex/bison generate two targets, and when those targets are
prerequisite of other rules they are considered independently by make.

We can have a situation where the .c file is out-of-date but not the
.h, git checkout for example. In this case, if a rule only have the .h
file as prerequiste, make will procced and start to build the object.
In parallel, another target can have the .c file as prerequisite and
make will find out it need re-generating and do so, changing the .h at
the same time. This parallel task breaks the first one.

To avoid this scenario, we put both the header and the source as
prerequisite for all object even if they only need the header.

Reported-by: Andrew Cooper <Andrew.Cooper3@citrix.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libs/util/Makefile