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(1): allow the inconsistency with Lst_OpenS...



details:   https://anonhg.NetBSD.org/src/rev/634fd6f925d0
branches:  trunk
changeset: 942931:634fd6f925d0
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Aug 22 13:49:40 2020 +0000

description:
make(1): allow the inconsistency with Lst_OpenS to be discovered

The -dL option is intended to find bugs in Makefiles and in make itself,
therefore enabling the consistency check is ok there.  Having this check
available by default increases the chances of the bug being found and
finally fixed.

diffstat:

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

diffs (40 lines):

diff -r cea5db6e0ee4 -r 634fd6f925d0 usr.bin/make/lst.c
--- a/usr.bin/make/lst.c        Sat Aug 22 13:44:17 2020 +0000
+++ b/usr.bin/make/lst.c        Sat Aug 22 13:49:40 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lst.c,v 1.23 2020/08/22 13:28:20 rillig Exp $ */
+/* $NetBSD: lst.c,v 1.24 2020/08/22 13:49:40 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -37,11 +37,11 @@
 #include "make.h"
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lst.c,v 1.23 2020/08/22 13:28:20 rillig Exp $";
+static char rcsid[] = "$NetBSD: lst.c,v 1.24 2020/08/22 13:49:40 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: lst.c,v 1.23 2020/08/22 13:28:20 rillig Exp $");
+__RCSID("$NetBSD: lst.c,v 1.24 2020/08/22 13:49:40 rillig Exp $");
 #endif /* not lint */
 #endif
 
@@ -712,14 +712,12 @@
 Lst_OpenS(Lst list)
 {
     assert(LstIsValid(list));
-#if 0
+
     /* XXX: This assertion fails for NetBSD's "build.sh -j1 tools", somewhere
      * between "dependall ===> compat" and "dependall ===> binstall".
      * Building without the "-j1" succeeds though. */
-    if (list->isOpen)
+    if (DEBUG(LINT) && list->isOpen)
        Parse_Error(PARSE_WARNING, "Internal inconsistency: list opened twice");
-    assert(!list->isOpen);
-#endif
 
     list->isOpen = TRUE;
     list->lastAccess = LstIsEmpty(list) ? Head : Unknown;



Home | Main Index | Thread Index | Old Index