HomeFreeBSD

Fix LOCAL_MODULES and improve the make output.

Description

Fix LOCAL_MODULES and improve the make output.

The exists() check guarding the invocation of ls was not working
correctly as it was expanding '$L' to determine the path of the local
modules directory. Fix by using {} around the variable name.

Inline some of the logic from bsd.subdir.mk when invoking local module
builds. This gives output in 'make buildkernel' the same as if there
was a Makefile in /usr/local/sys/modules with SUBDIR =
${LOCAL_MODULES}.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D20991

Details