diff options
| author | rillig <rillig@NetBSD.org> | 2022-05-07 17:49:47 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2022-05-07 17:49:47 +0000 |
| commit | 88bfda226b0daf6aa9a98e6d4d9ea5ed26981fcd (patch) | |
| tree | eb61cfa0cbdffdb0dede694c957fb260e7190ea2 /usr.bin/make/make.1 | |
| parent | c4192bec8245e8ce280bb74eca8820dca4e9574c (diff) | |
make: allow to randomize build order of targets
In complex dependency structures, when a build fails, a probable cause
is a missing dependency declaration between some files. In compat mode,
the build order is deterministic, in jobs mode, it is somewhat
deterministic. To explore more edge cases, add the line ".MAKE.MODE +=
randomize-targets" somewhere in the makefile.
Fixes PR bin/45226 by riastradh. Reviewed by christos.
Diffstat (limited to 'usr.bin/make/make.1')
| -rw-r--r-- | usr.bin/make/make.1 | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/make/make.1 b/usr.bin/make/make.1 index 923bfc2324c..fe3ede6e685 100644 --- a/usr.bin/make/make.1 +++ b/usr.bin/make/make.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.308 2022/04/18 15:06:27 rillig Exp $ +.\" $NetBSD: make.1,v 1.309 2022/05/07 17:49:47 rillig Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd April 18, 2022 +.Dd May 7, 2022 .Dt MAKE 1 .Os .Sh NAME @@ -978,6 +978,10 @@ If .Va bf is True, when a .meta file is created, mark the target .Ic .SILENT . +.It Pa randomize-targets +In both compat and parallel mode, do not make the targets in the usual order, +but instead randomize their order. +This mode can be used to detect undeclared dependencies between files. .El .It Va .MAKE.META.BAILIWICK In "meta" mode, provides a list of prefixes which @@ -2250,8 +2254,9 @@ will to it and update the value of .Ql Va .OBJDIR . .It Ic .ORDER -The named targets are made in sequence. +In parallel mode, the named targets are made in sequence. This ordering does not add targets to the list of targets to be made. +.Pp Since the dependents of a target do not get built until the target itself could be built, unless .Ql a @@ -2262,9 +2267,6 @@ the following is a dependency loop: b: a .Ed .Pp -The ordering imposed by -.Ic .ORDER -is only relevant for parallel makes. .\" XXX: NOT YET!!!! .\" .It Ic .PARALLEL .\" The named targets are executed in parallel mode. |
