make: Fix parallel builds

Parallel builds would fail while generating the dependency file of the
first source file that included tests_list.h due to it missing.
In-order builds only worked, because a rule that specified tests_list.c
as a prerequisite happened to get executed first.

This patch introduces tests_list.h as an order-only dependency of all
rules that generate dependency files. This is necessary because we can't
know which files actually depend on it until the dependency files have
been generated.

This forces the autogenerated files to be generated before any other
files are compiled, but does not cause unrelated files to recompile if
they are modified.

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Change-Id: I21f0b98052a884a853935ea35a2898ff90245a49
7 files changed