This approach is better then the previous one mainly because the latter
required creating the task generator for the checks in a separate group and
posting that target implied in posting the whole previous build groups.
Some notes:
- This is implemented so that headers aren't checked more than once, so there
might be some checking tasks that won't do anything because the headers are
checked on another task. Even so, those headers are added to the result of
scan() in order to provide a consistent output to the user.
- It is safe manipulating the shared variable dispatched_headers because the
scan() is called before the task is added to the execution queue.
- Although we force ap_library_check_headers.scan() to always be called,
that's OK, because we use the scanning result of the compilation task, which
returns a cached value if there's no need to rescan.
That's a tool for creating task generators for libraries object files. One of
the key objectives of this patch is to provide a way to avoid recompiling
sources that are independent of vehicles.