summaryrefslogtreecommitdiff
path: root/makefile.com
diff options
context:
space:
mode:
authorSergei Trofimovich <siarheit@google.com>2022-06-04 15:48:01 -0400
committerPaul Smith <psmith@gnu.org>2022-06-04 19:04:37 -0400
commit621d3196fae94e9006a7e9c5ffdaf5ec209bf832 (patch)
tree15cbbc7aa6f32400fd4c80a6704099584eb722bc /makefile.com
parente4b7ac21dc1663de1d901cda0b395d819b5c08ab (diff)
downloadmake-git-621d3196fae94e9006a7e9c5ffdaf5ec209bf832.tar.gz
[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.
Diffstat (limited to 'makefile.com')
-rw-r--r--makefile.com2
1 files changed, 1 insertions, 1 deletions
diff --git a/makefile.com b/makefile.com
index 4a36a354..86da500c 100644
--- a/makefile.com
+++ b/makefile.com
@@ -76,7 +76,7 @@ $ filelist = "[.src]ar [.src]arscan [.src]commands [.src]default [.src]dir " + -
"[.src]hash [.src]implicit [.src]job [.src]load [.src]main " + -
"[.src]misc [.src]read [.src]remake [.src]remote-stub " + -
"[.src]rule [.src]output [.src]signame [.src]variable " + -
- "[.src]version [.src]strcache [.src]vpath " + -
+ "[.src]version [.src]shuffle [.src]strcache [.src]vpath " + -
"[.src]vmsfunctions [.src]vmsify [.src]vms_progname " + -
"[.src]vms_exit [.src]vms_export_symbol " + -
"[.lib]alloca [.lib]fnmatch [.lib]glob [.src]getopt1 [.src]getopt"