mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-14 22:32:30 +01:00
Add a guard for broken SUBDIR.${MK_FOO} use
Check for the variable SUBDIR. and error as it usually means someone forgot to include src.opts.mk. This guard from CheriBSD found the bugs in r367655 and r367728. Reviewed by: bdrewery, arichardson Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27211
This commit is contained in:
parent
a521f21164
commit
02e65672b4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=367735
@ -127,6 +127,12 @@ SUBDIR:=${SUBDIR} ${SUBDIR.yes} ${SUBDIR.yes.yes}
|
|||||||
SUBDIR:=${SUBDIR:u}
|
SUBDIR:=${SUBDIR:u}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if defined(SUBDIR.)
|
||||||
|
.error ${.CURDIR}: Found variable SUBDIR. with value "${SUBDIR.}". This was \
|
||||||
|
probably caused by using SUBDIR.$${MK_FOO} without including \
|
||||||
|
<src.opts.mk> or by using an invalid $${MK_FOO} option.
|
||||||
|
.endif
|
||||||
|
|
||||||
# Subdir code shared among 'make <subdir>', 'make <target>' and SUBDIR_PARALLEL.
|
# Subdir code shared among 'make <subdir>', 'make <target>' and SUBDIR_PARALLEL.
|
||||||
_SUBDIR_SH= \
|
_SUBDIR_SH= \
|
||||||
if test -d ${.CURDIR}/$${dir}.${MACHINE_ARCH}; then \
|
if test -d ${.CURDIR}/$${dir}.${MACHINE_ARCH}; then \
|
||||||
|
Loading…
Reference in New Issue
Block a user