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
This commit is contained in:
parent
0b26119b21
commit
9b82c66474
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=350664
@ -61,7 +61,7 @@ LOCAL_MODULES_DIR?= ${LOCALBASE}/sys/modules
|
|||||||
|
|
||||||
# Default to installing all modules installed by ports unless overridden
|
# Default to installing all modules installed by ports unless overridden
|
||||||
# by the user.
|
# by the user.
|
||||||
.if !defined(LOCAL_MODULES) && exists($LOCAL_MODULES_DIR)
|
.if !defined(LOCAL_MODULES) && exists(${LOCAL_MODULES_DIR})
|
||||||
LOCAL_MODULES!= ls ${LOCAL_MODULES_DIR}
|
LOCAL_MODULES!= ls ${LOCAL_MODULES_DIR}
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
@ -77,7 +77,9 @@ modules-${target}:
|
|||||||
${target:S/^reinstall$/install/:S/^clobber$/cleandir/}
|
${target:S/^reinstall$/install/:S/^clobber$/cleandir/}
|
||||||
.endif
|
.endif
|
||||||
.for module in ${LOCAL_MODULES}
|
.for module in ${LOCAL_MODULES}
|
||||||
cd ${LOCAL_MODULES_DIR}/${module}; ${MKMODULESENV} ${MAKE} \
|
@${ECHODIR} "===> ${module} (${target:S/^reinstall$/install/:S/^clobber$/cleandir/})"
|
||||||
|
@cd ${LOCAL_MODULES_DIR}/${module}; ${MKMODULESENV} ${MAKE} \
|
||||||
|
DIRPRFX="${module}/" \
|
||||||
${target:S/^reinstall$/install/:S/^clobber$/cleandir/}
|
${target:S/^reinstall$/install/:S/^clobber$/cleandir/}
|
||||||
.endfor
|
.endfor
|
||||||
.endif
|
.endif
|
||||||
|
Loading…
Reference in New Issue
Block a user