summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2022-10-15 18:11:21 -0400
committerPaul Smith <psmith@gnu.org>2022-10-16 16:18:21 -0400
commite5e538fb7a9cb6a42dae6aa1ad9f36a3dc769ad9 (patch)
treede826cb70346fcdc802278f177da8a671c25b071 /src/main.c
parentc453f898a00db16e3fc3648ffd65fcf3a23dc806 (diff)
downloadmake-git-e5e538fb7a9cb6a42dae6aa1ad9f36a3dc769ad9.tar.gz
[SV 63215] Remember the random seed for shuffle mode
Basic fix provided by James Hilliard <james.hilliard1@gmail.com>. Ensure we remember and propagate the random seed we generate during shuffle mode. Also add a debug statement displaying the seed. * src/shuffle.c (shuffle_set_mode): Init and save the randoms seed. * src/misc.c (make_rand): Code cleanups. * src/main.c (main): Show a debug message containing the seed.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 05b11c63..d9068ae0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2318,6 +2318,9 @@ main (int argc, char **argv, char **envp)
OUTPUT_UNSET ();
output_close (&make_sync);
+ if (shuffle_mode)
+ DB (DB_BASIC, (_("Enabled shuffle mode: %s\n"), shuffle_mode));
+
if (read_files)
{
/* Update any makefiles if necessary. */