Try really hard to fix parallel installs. Add a bunch of .ORDER

directives to ensure that all realinstall sub-tasks are executed
after beforeinstall, similarly ensure that all afterinstall sub-
tasks are executed after realinstall.  Demonstration:

all: task1 task2
.ORDER: task1 task2

task2: task2_subtask
.ORDER: task1 task2_subtask

task1 task2 task2_subtask:
	@sleep `jot -r 1 0 1.0`
	@echo ${.TARGET}

Without the second .ORDER directive, task2_subtask can be run in
parallel with task1.

Spotted by:	Andrea Campi <andrea@webcom.it>
This commit is contained in:
ru 2002-07-03 12:28:03 +00:00
parent 352eaf673d
commit 734b0dc514
5 changed files with 8 additions and 0 deletions

View File

@ -66,3 +66,4 @@ _${group}INS: ${_${group}FILES}
.endif !target(installfiles)
realinstall: installfiles
.ORDER: beforeinstall installfiles

View File

@ -77,3 +77,4 @@ installincludes:
.endif !target(installincludes)
realinstall: installincludes
.ORDER: beforeinstall installincludes

View File

@ -290,6 +290,7 @@ _SHLINSTALLFLAGS:= ${_SHLINSTALLFLAGS${ie}}
.if defined(LIB) && !empty(LIB) && !defined(INTERNALLIB)
realinstall: _libinstall
.ORDER: beforeinstall _libinstall
_libinstall:
.if !defined(NOINSTALLLIB)
${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
@ -323,6 +324,7 @@ _libinstall:
.if !defined(NOMAN)
realinstall: _maninstall
.ORDER: beforeinstall _maninstall
.endif
.endif

View File

@ -5,6 +5,7 @@
.endif
afterinstall: _installlinks
.ORDER: realinstall _installlinks
_installlinks:
.if defined(LINKS) && !empty(LINKS)
@set ${LINKS}; \

View File

@ -102,6 +102,7 @@ _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
.if !target(realinstall)
realinstall: _proginstall
.ORDER: beforeinstall _proginstall
_proginstall:
.if defined(PROG)
.if defined(PROGNAME)
@ -120,6 +121,7 @@ _proginstall:
.if defined(SCRIPTS) && !empty(SCRIPTS)
realinstall: _scriptsinstall
.ORDER: beforeinstall _scriptsinstall
SCRIPTSDIR?= ${BINDIR}
SCRIPTSOWN?= ${BINOWN}
@ -154,6 +156,7 @@ NLSNAME?= ${PROG}
.if !defined(NOMAN)
realinstall: _maninstall
.ORDER: beforeinstall _maninstall
.endif
.endif