From: Matthew Dillon Date: Sun, 21 Mar 2004 17:15:41 +0000 (+0000) Subject: A large number of targets were doing a mkdir -p openssl. A parallel make X-Git-Tag: v2.0.1~11715 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/06bff654510f8eb33624086bd11c8ac5909e20f7 A large number of targets were doing a mkdir -p openssl. A parallel make may execute several of these simultaniously, causing mkdir -p to race against itself. mkdir -p is not atomic (it does a stat and then a later mkdir) and can fail under these conditions, causing a buildworld -j N to fail, so move it to its own dependancy. --- diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index ec5b336f9a..36db5e00ce 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -1,5 +1,5 @@ # $FreeBSD: src/secure/lib/libcrypto/Makefile.inc,v 1.7.2.11 2003/02/20 15:07:32 nectar Exp $ -# $DragonFly: src/secure/lib/libcrypto/Makefile.inc,v 1.2 2003/06/17 04:27:48 dillon Exp $ +# $DragonFly: src/secure/lib/libcrypto/Makefile.inc,v 1.3 2004/03/21 17:15:41 dillon Exp $ LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc @@ -81,25 +81,28 @@ buildinf.h: echo " #define DATE \"`LC_ALL=C date`\""; \ echo "#endif" ) > ${.TARGET} -openssl/opensslconf.h: ../../lib/libcrypto/opensslconf-${MACHINE_ARCH}.h - mkdir -p openssl - cp ${.OODATE} ${.TARGET} +openssl/opensslconf.h: openssl ../../lib/libcrypto/opensslconf-${MACHINE_ARCH}.h + cp ${.OODATE:Nopenssl} ${.TARGET} -openssl/evp.h: ${LCRYPTO_SRC}/crypto/evp/evp.h - mkdir -p openssl +openssl/evp.h: openssl ${LCRYPTO_SRC}/crypto/evp/evp.h .if !defined(MAKE_IDEA) || ${MAKE_IDEA} != YES - sed '/^#ifndef OPENSSL_NO_IDEA$$/,/^#endif$$/d' ${.OODATE} > ${.TARGET} + sed '/^#ifndef OPENSSL_NO_IDEA$$/,/^#endif$$/d' ${.OODATE:Nopenssl} > ${.TARGET} .else - ${INSTALL} -C -m 444 ${.OODATE} ${.TARGET} + ${INSTALL} -C -m 444 ${.OODATE:Nopenssl} ${.TARGET} .endif SRCS+= ${HDRS:T:S;^;openssl/;} .for h in ${HDRS:S/^/${LCRYPTO_SRC}\/crypto\//} -openssl/${h:T}: ${h} - mkdir -p openssl +openssl/${h:T}: openssl ${h} ${INSTALL} -C -m 444 ${h} openssl .endfor +# This fixes a parallel-make issue with mkdir races +# that sometimes cause buildworld -j N to fail. +# +openssl: + mkdir -p openssl + MANDIR= ${SHAREDIR}/openssl/man/man .if defined(LIB)