man page installation could cause "make install" failure.
Here's a fix:
From f7d169431ab70ee50713891b5d7b7e2c301c65bc Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email protected]>
Date: Tue, 22 Nov 2016 21:33:58 -0800
Subject: [PATCH] build: avoid racy failure of "make -jN install"

Installing with -j2 or greater could result in a failure like
  /bin/sh: line 29: /P/bin/install: Permission denied
when /P/bin/install specifies your PATH-selected install program.
This would arise because we're using "install" to install all
man/*.1 files, and that command would run concurrently with the one
that installs "/P/bin/install" itself.  We would run this command:
"src/ginstall src/ginstall /P/bin/install", and it would result
in intervals during which the destination file does not exist,
is empty or incomplete and not executable.  We addressed this
problem long ago for installation of actual binaries by telling the
installation rules ot use our just-built bin/ginstall (only when not
cross-compiling) rather than the PATH-resolved "install" program.
This change is to do the same for those .1 files.
* src/local.mk (INSTALL): Use $(cu_install_program) here, too.
---
 src/local.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/local.mk b/src/local.mk
index 9e36ad9..37f625c 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -644,3 +644,4 @@ else
 cu_install_program = src/ginstall
 endif
 INSTALL_PROGRAM = $(cu_install_program)
+INSTALL = $(cu_install_program) -c
-- 
2.9.3

Reply via email to