bsd.dep.mk: fix race condition with beforedepend
authorSimon Schubert <corecode@dragonflybsd.org>
Sat, 12 Sep 2009 08:58:37 +0000 (10:58 +0200)
committerSimon Schubert <corecode@dragonflybsd.org>
Sat, 12 Sep 2009 14:56:24 +0000 (16:56 +0200)
The recent depend changes introduced a possible race between running
mkdep and beforedepend, since the .ORDER was only specified for
beforedepend and ${DEPENDFILE}, but not for the intermediate
${_DEPENDFILES}.

share/mk/bsd.dep.mk

index 6ad6e12..fd9de80 100644 (file)
@@ -168,14 +168,14 @@ _EXTRADEPEND: .USE
 ${DEPENDFILE}: _EXTRADEPEND
 .endif
 
-.ORDER: ${DEPENDFILE} afterdepend
+.ORDER: ${_DEPENDFILES} ${DEPENDFILE} afterdepend
 .else
 depend: beforedepend afterdepend
 .endif
 .if !target(beforedepend)
 beforedepend:
 .else
-.ORDER: beforedepend ${DEPENDFILE}
+.ORDER: beforedepend ${_DEPENDFILES} ${DEPENDFILE}
 .ORDER: beforedepend afterdepend
 .endif
 .if !target(afterdepend)