From 2e1dfb346f1e3dd08eff70b5d4478c9f811084b2 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Tue, 17 Mar 2020 18:17:32 +0000 Subject: [PATCH] Support SUBDIR.${MK_FOO}.${MK_BAR} expresssions. This allows simplification of Makefiles where some SUBDIR entries depend on two things (e.g. something that depends on C++ and some other knob). Discussed with: imp, jhb Obtained from: CheriBSD MFC after: 3 days Sponsored by: DARPA --- share/mk/bsd.subdir.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 145c17dff754..40fe454ecacc 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -16,8 +16,8 @@ # # SUBDIR A list of subdirectories that should be built as well. # Each of the targets will execute the same target in the -# subdirectories. SUBDIR.yes is automatically appended -# to this list. +# subdirectories. SUBDIR.yes and SUBDIR.yes.yes are +# automatically appended to this list. # # +++ targets +++ # @@ -122,8 +122,8 @@ install: beforeinstall realinstall afterinstall # SUBDIR recursing may be disabled for MK_DIRDEPS_BUILD .if !target(_SUBDIR) -.if defined(SUBDIR) || defined(SUBDIR.yes) -SUBDIR:=${SUBDIR} ${SUBDIR.yes} +.if defined(SUBDIR) || defined(SUBDIR.yes) || defined(SUBDIR.yes.yes) +SUBDIR:=${SUBDIR} ${SUBDIR.yes} ${SUBDIR.yes.yes} SUBDIR:=${SUBDIR:u} .endif