HomeFreeBSD

For 'make <directory>' hook into the all_subdir_<directory> targets.

Description

For 'make <directory>' hook into the all_subdir_<directory> targets.

This fixes parallel build issues when trying to depend on ${SUBDIR}. An
example of this in share/i18n/csmapper/Makefile where mapper.dir depends
on ${SUBDIR} having been traversed and built already. Before this
change running make in that directory would build the subdirectories
twice. This led to obscure build races. While reworking that build
may be possible, the framework should not so easily allow creating such
problems.

Now depending on <directory> will properly redirect to the
all_subdir_<directory> target rather than invoking the inline shell.

This also makes 'make -jX <directory>' now respect any
SUBDIR_DEPEND_<directory> statements when SUBDIR_PARALLEL is defined.
This is not entirely intended and may be changed later.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

Details