drivers: relax dependency order
authorThomas Monjalon <thomas@monjalon.net>
Mon, 27 Jul 2020 17:47:08 +0000 (20:47 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 28 Jul 2020 16:28:47 +0000 (18:28 +0200)
commit9e72b0453911207fff14809c0c3f134011f13232
tree00f6efec5549c7b677cb6013762cf275106c5378
parent6d5a19d6a21697557478e961349b35cc8b839f7c
drivers: relax dependency order

Drivers dependencies are evaluated in the order defined per their parent
directory (also called class). This strict ordering prevents from
having pairs of drivers from two classes with different dependency
ordering. For example, if the mlx5 common code depends on the pci bus
driver, while the dpaax common code is itself a dependency of the dpaa
bus driver.  Having a strict ordering between directories bus and common
is too restrictive, as processing either common drivers or bus drivers
first leads us to missing dependencies in this scenario.

This patch makes it possible to have a more fine-grain directory list,
adding a specific driver sub-directory in the top-level drivers
subdirectory list. In this case, the isolated driver must also be removed
from its class list, and the per-class variables must be duplicated in
the isolated driver, because the call "subdir(class)" is skipped in the
isolated driver case.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
drivers/meson.build