svn commit: r354740 - head/share/mk

Alex Richardson arichardson at FreeBSD.org
Fri Nov 15 18:34:37 UTC 2019


Author: arichardson
Date: Fri Nov 15 18:34:36 2019
New Revision: 354740
URL: https://svnweb.freebsd.org/changeset/base/354740

Log:
  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

Modified:
  head/share/mk/bsd.files.mk

Modified: head/share/mk/bsd.files.mk
==============================================================================
--- head/share/mk/bsd.files.mk	Fri Nov 15 18:34:30 2019	(r354739)
+++ head/share/mk/bsd.files.mk	Fri Nov 15 18:34:36 2019	(r354740)
@@ -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})


More information about the svn-src-head mailing list