Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make: do not evaluate the ':O' modifiers in par...



details:   https://anonhg.NetBSD.org/src/rev/228a2ae1e6bb
branches:  trunk
changeset: 953642:228a2ae1e6bb
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Mar 14 20:03:56 2021 +0000

description:
make: do not evaluate the ':O' modifiers in parse-only mode

No functional change in practical usage.  Theoretically this change can
be observed by looking at the generated random numbers for the ':Ox'
modifier, but the quality or exact sequence of these random numbers is
not guaranteed anyway.

diffstat:

 usr.bin/make/var.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 6a7149eeb96f -r 228a2ae1e6bb usr.bin/make/var.c
--- a/usr.bin/make/var.c        Sun Mar 14 20:00:48 2021 +0000
+++ b/usr.bin/make/var.c        Sun Mar 14 20:03:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.878 2021/03/14 20:00:48 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.879 2021/03/14 20:03:56 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*     "@(#)var.c      8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.878 2021/03/14 20:00:48 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.879 2021/03/14 20:03:56 rillig Exp $");
 
 typedef enum VarFlags {
        VFL_NONE        = 0,
@@ -3275,6 +3275,9 @@
        } else
                return AMR_BAD;
 
+       if (!(st->expr->eflags & VARE_WANTRES))
+               return AMR_OK;
+
        words = Str_Words(st->expr->value.str, FALSE);
        if (mode == SHUFFLE)
                ShuffleStrings(words.words, words.len);



Home | Main Index | Thread Index | Old Index