Fix build race in bsd.files.mk

We need to ensure that installdirs-FOO runs before installfiles-FOO since
otherwise the directory may not exist when we attempt to install the target.
This was randomly causing failures in our Jenkins instance when installing
drti.o in cddl/lib/drti.

Reviewed By:	brooks
Differential Revision: https://reviews.freebsd.org/D22382
This commit is contained in:
Alex Richardson 2019-11-15 18:34:36 +00:00
parent 1e9f67e2e4
commit 310399ac72
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354740

View File

@ -112,12 +112,11 @@ STAGE_AS_SETS+= ${${_${group}DIR_${file}}:C,[/*],_,g}
STAGE_DIR.${${_${group}DIR_${file}}:C,[/*],_,g}= ${STAGE_OBJTOP}${${_${group}DIR_${file}}}
stage_as.${${_${group}DIR_${file}}:C,[/*],_,g}: ${file}
installfiles-${group}: _${group}INS1_${file}
_${group}INS1_${file}: installdirs-${_${group}DIR_${file}} _${group}INS_${file}
_${group}INS_${file}: ${file}
installfiles-${group}: _${group}INS_${file}
_${group}INS_${file}: ${file} installdirs-${_${group}DIR_${file}}
${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${file}} \
-g ${${group}GRP_${file}} -m ${${group}MODE_${file}} \
${.ALLSRC} ${${group}PREFIX_${file}}/${${group}NAME_${file}}
${.ALLSRC:[1]} ${${group}PREFIX_${file}}/${${group}NAME_${file}}
.endfor # file in ${${group}}
.endif # defined(${group}) && !empty(${group})