Module Name:    src
Committed By:   christos
Date:           Mon May  1 20:22:18 UTC 2023

Modified Files:
        src/share/mk: bsd.info.mk

Log Message:
Create the INFODIRFILE if it does not exist, so that we can take a lock
on it. Hopefully fixes a race condition where two parallel makes attempt
to create the file at the same time.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/share/mk/bsd.info.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.info.mk
diff -u src/share/mk/bsd.info.mk:1.42 src/share/mk/bsd.info.mk:1.43
--- src/share/mk/bsd.info.mk:1.42	Mon Jan 21 16:11:54 2019
+++ src/share/mk/bsd.info.mk	Mon May  1 16:22:18 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.info.mk,v 1.42 2019/01/21 21:11:54 christos Exp $
+#	$NetBSD: bsd.info.mk,v 1.43 2023/05/01 20:22:18 christos Exp $
 
 .include <bsd.init.mk>
 
@@ -42,7 +42,7 @@ __infoinstall: .USE
 	    -g ${INFOGRP_${.ALLSRC:T}:U${INFOGRP}} \
 	    -m ${INFOMODE_${.ALLSRC:T}:U${INFOMODE}} \
 	    ${.ALLSRC} ${.TARGET}
-	@[ -f ${INFODIRFILE} ] &&					\
+	@[ -f ${INFODIRFILE} ] || touch ${INFODIRFILE}; 		\
 	while ! ln ${INFODIRFILE} ${INFODIRFILE}.lock 2> /dev/null;	\
 		do sleep 1; done;					\
 	${TOOL_INSTALL_INFO} -d ${INFODIRFILE} -r ${.TARGET} 2> /dev/null; \

Reply via email to