1
0
mirror of https://github.com/mirror/make.git synced 2025-03-29 13:31:09 +08:00
make/src
Sergei Trofimovich 621d3196fa [SV 62100] Add '--shuffle' option support
Introduce non-deterministic ordering into goal and prerequisite
traversal to help tease out inconsistent failures that may happen
when running in parallel build mode.

Introduce second order into each dependency chain:
1. Existing order is syntactic order reachable via 'dep->next'
2. New order is shuffled order stored as 'dep->shuf' in each 'dep'

When updating goals and prerequisites and '--shuffle' is provided,
use the shuffled order to walk the graph.  When automatic variable
are set always use the syntactic order of parameters.

* Makefile.am: Add new src/shuffle.c and src/shuffle.h file.
* build_w32.bat: Ditto.
* builddos.bat: Ditto.
* makefile.com: Ditto.
* po/POTFILES.in: Ditto.
* doc/make.texi: Add documentation for --shuffle.
* doc/make.1: Ditto.
* src/dep.h (DEP): Add the shuf pointer.
* src/filedef.h (struct file): Add was_shuffled flag.
* src/main.c: (shuffle_mode): Global flag for the shuffle mode.
(usage): Add the --shuffle option.
(switches): Ditto.
(main): Set shuffle_mode based on the command line parameter.
Reshuffle prerequisites if requested.
* src/remake.c (update_goal_chain): Walk the shuffled list if enabled.
(update_file_1): Ditto.
* src/shuffle.h: Provide an interface for shuffling prerequisites.
* src/shuffle.c: Implement option parsing and prerequisite shuffling.
* tests/scripts/options/shuffle: Test shuffle option and modes.
2022-06-04 19:04:37 -04:00
..
w32 * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
amiga.c Remove extraneous characters from fatal() calls 2022-02-27 18:01:13 -05:00
amiga.h * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
ar.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
arscan.c * src/misc.c (make_toui): Parse a string into an unsigned int 2022-06-04 18:34:15 -04:00
commands.c * src/misc.c (make_pid): A function to return the PID 2022-06-04 17:04:38 -04:00
commands.h [SV 62324] Simplify set_file_variables by passing in the stem 2022-04-24 10:39:32 -04:00
config.ami.template * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
config.h-vms.template * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
config.h.W32.template * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
configh.dos.template * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
debug.h * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
default.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
dep.h [SV 62100] Add '--shuffle' option support 2022-06-04 19:04:37 -04:00
dir.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
expand.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
file.c [SV 62324] Simplify set_file_variables by passing in the stem 2022-04-24 10:39:32 -04:00
filedef.h [SV 62100] Add '--shuffle' option support 2022-06-04 19:04:37 -04:00
function.c Replace strcmp() with memcmp() where possible 2022-04-24 17:52:54 -04:00
getopt1.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
getopt.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
getopt.h * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
gettext.h * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
gmk-default.scm * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
gnumake.h * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
guile.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
hash.c Clean up a few Windows build warnings (not all!) 2021-09-05 21:09:27 -04:00
hash.h hash: Remove unnecessary isupper() check before tolower() 2022-04-24 17:52:54 -04:00
implicit.c [SV 62100] Add '--shuffle' option support 2022-06-04 19:04:37 -04:00
job.c [SV 62100] Add '--shuffle' option support 2022-06-04 19:04:37 -04:00
job.h [SV 62145] Remove a stdin temp file on re-exec failure. 2022-04-24 10:39:32 -04:00
load.c Remove extraneous characters from fatal() calls 2022-02-27 18:01:13 -05:00
loadapi.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
main.c [SV 62100] Add '--shuffle' option support 2022-06-04 19:04:37 -04:00
makeint.h * src/misc.c (make_toui): Parse a string into an unsigned int 2022-06-04 18:34:15 -04:00
misc.c * src/misc.c (make_toui): Parse a string into an unsigned int 2022-06-04 18:34:15 -04:00
os.h * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
output.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
output.h * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
posixos.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
read.c Replace strcmp() with memcmp() where possible 2022-04-24 17:52:54 -04:00
remake.c [SV 62100] Add '--shuffle' option support 2022-06-04 19:04:37 -04:00
remote-cstms.c * src/commands.h: [SV 62213] Forward-declare struct file / child 2022-04-24 10:39:32 -04:00
remote-stub.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
rule.c [SV 62206] Fix %-substitution in second expansion of pattern rules 2022-04-24 17:52:07 -04:00
rule.h * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
shuffle.c [SV 62100] Add '--shuffle' option support 2022-06-04 19:04:37 -04:00
shuffle.h [SV 62100] Add '--shuffle' option support 2022-06-04 19:04:37 -04:00
signame.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
strcache.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
variable.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
variable.h * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
version.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
vms_exit.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
vms_export_symbol.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
vms_progname.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
vmsdir.h * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
vmsfunctions.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
vmsify.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
vmsjobs.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
vpath.c * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00