bsd.progs.mk must pass META_XTRAS to gendirdeps.mk

The indirection used by bsd.progs.mk is setting META_XTRAS
means the value needs to be passed in the environment to
gendirdeps.mk, as any expansion before then will be empty.

Remove a now misleading comment from bsd.progs.mk
before it includes bsd.prog.mk

Update gendirdeps.mk to accommodate this.

Reviewed by:	stevek
This commit is contained in:
Simon J. Gerraty 2023-11-04 10:16:33 -07:00
parent 586fed0b03
commit 6647af9b56
2 changed files with 7 additions and 2 deletions

View file

@ -64,6 +64,8 @@ all: ${PROGS}
.endif
META_XTRAS+= ${cat ${PROGS:S/$/*.meta_files/} 2>/dev/null || true:L:sh}
# the above does no use unless we pass it on to gendirdeps.mk
GENDIRDEPS_ENV += META_XTRAS='${META_XTRAS}'
.if ${MK_STAGING} != "no" && !empty(PROGS)
# Stage from parent while respecting PROGNAME and BINDIR overrides.
@ -88,7 +90,6 @@ $v =
.endfor
.endif
# handle being called [bsd.]progs.mk
.include <bsd.prog.mk>
.if !defined(_SKIP_BUILD)

View file

@ -1,4 +1,4 @@
# $Id: gendirdeps.mk,v 1.49 2023/04/20 17:45:03 sjg Exp $
# $Id: gendirdeps.mk,v 1.50 2023/11/04 16:47:34 sjg Exp $
# SPDX-License-Identifier: BSD-2-Clause
#
@ -102,6 +102,10 @@ _DEPENDFILE := ${_CURDIR}/${.MAKE.DEPENDFILE:T}
# caller should have set this
META_FILES ?= ${.MAKE.META.FILES}
# this sometimes needs to be passed separately
.if !empty(META_XTRAS)
META_FILES += ${META_XTRAS:N\*.meta}
.endif
.if !empty(META_FILES)