1*954401e6SSimon J. Gerraty# $NetBSD: depsrc-wait.mk,v 1.4 2022/05/07 17:49:47 rillig Exp $ 22c3632d1SSimon J. Gerraty# 3956e45f6SSimon J. Gerraty# Tests for the special source .WAIT in dependency declarations, 4956e45f6SSimon J. Gerraty# which adds a sequence point between the nodes to its left and the nodes 5956e45f6SSimon J. Gerraty# to its right. 62c3632d1SSimon J. Gerraty 7*954401e6SSimon J. Gerratyall: .PHONY 8*954401e6SSimon J. Gerraty @${MAKE} -r -f ${MAKEFILE} x 9*954401e6SSimon J. Gerraty @${MAKE} -r -f ${MAKEFILE} three-by-three 10*954401e6SSimon J. Gerraty 11*954401e6SSimon J. Gerraty 12*954401e6SSimon J. Gerraty.if make(x) 13956e45f6SSimon J. Gerraty# Even though the build could run massively parallel, the .WAIT imposes a 14956e45f6SSimon J. Gerraty# strict ordering in this example, which forces the targets to be made in 15956e45f6SSimon J. Gerraty# exactly this order. 16956e45f6SSimon J. Gerraty.MAKEFLAGS: -j8 172c3632d1SSimon J. Gerraty 18956e45f6SSimon J. Gerraty# This is the example from the manual page. 19956e45f6SSimon J. Gerraty.PHONY: x a b b1 20956e45f6SSimon J. Gerratyx: a .WAIT b 21956e45f6SSimon J. Gerraty echo x 22956e45f6SSimon J. Gerratya: 23956e45f6SSimon J. Gerraty echo a 24956e45f6SSimon J. Gerratyb: b1 25956e45f6SSimon J. Gerraty echo b 26956e45f6SSimon J. Gerratyb1: 27956e45f6SSimon J. Gerraty echo b1 28*954401e6SSimon J. Gerraty.endif 29*954401e6SSimon J. Gerraty 30*954401e6SSimon J. Gerraty 31*954401e6SSimon J. Gerraty# There are 3 groups of 3 targets, with .WAIT barriers in between. Each of 32*954401e6SSimon J. Gerraty# these groups has to be made completely before starting the next group. 33*954401e6SSimon J. Gerraty# See Makefile, POSTPROC for the postprocessing that takes place. 34*954401e6SSimon J. Gerraty.if make(three-by-three) 35*954401e6SSimon J. Gerraty.MAKEFLAGS: -j5 36*954401e6SSimon J. Gerraty.MAKE.MODE+= randomize-targets 37*954401e6SSimon J. Gerraty 38*954401e6SSimon J. Gerratythree-by-three: .WAIT 3a1 3a2 3a3 .WAIT 3b1 3b2 3b3 .WAIT 3c1 3c2 3c3 .WAIT 39*954401e6SSimon J. Gerraty3a1 3a2 3a3 3b1 3b2 3b3 3c1 3c2 3c3: 40*954401e6SSimon J. Gerraty : Making ${.TARGET} 41*954401e6SSimon J. Gerraty.endif 42