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): fix DEBUG_SRC logging in FindThem



details:   https://anonhg.NetBSD.org/src/rev/b718ca28c11b
branches:  trunk
changeset: 946312:b718ca28c11b
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Nov 23 13:52:27 2020 +0000

description:
make(1): fix DEBUG_SRC logging in FindThem

The node is also removed from the list if it is neither found in the
nodes nor in the file system.  The logging did not reflect this.

diffstat:

 usr.bin/make/suff.c |  15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diffs (50 lines):

diff -r 01558c5e57d6 -r b718ca28c11b usr.bin/make/suff.c
--- a/usr.bin/make/suff.c       Mon Nov 23 12:41:47 2020 +0000
+++ b/usr.bin/make/suff.c       Mon Nov 23 13:52:27 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: suff.c,v 1.303 2020/11/22 22:58:43 rillig Exp $        */
+/*     $NetBSD: suff.c,v 1.304 2020/11/23 13:52:27 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -114,7 +114,7 @@
 #include "dir.h"
 
 /*     "@(#)suff.c     8.4 (Berkeley) 3/21/94" */
-MAKE_RCSID("$NetBSD: suff.c,v 1.303 2020/11/22 22:58:43 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.304 2020/11/23 13:52:27 rillig Exp $");
 
 #define SUFF_DEBUG0(text) DEBUG0(SUFF, text)
 #define SUFF_DEBUG1(fmt, arg1) DEBUG1(SUFF, fmt, arg1)
@@ -1065,6 +1065,9 @@
     while (!Lst_IsEmpty(srcs)) {
        Candidate *src = Lst_Dequeue(srcs);
 
+#ifdef DEBUG_SRC
+       debug_printf("remove from list %p src %p:%s\n", srcs, src, src->file);
+#endif
        SUFF_DEBUG1("\ttrying %s...", src->file);
 
        /*
@@ -1072,10 +1075,6 @@
         * graph for it or the file actually exists.
         */
        if (Targ_FindNode(src->file) != NULL) {
-#ifdef DEBUG_SRC
-           debug_printf("remove from list %p src %p:%s\n",
-                        srcs, src, src->file);
-#endif
            retsrc = src;
            break;
        }
@@ -1084,10 +1083,6 @@
            char *file = Dir_FindFile(src->file, src->suff->searchPath);
            if (file != NULL) {
                retsrc = src;
-#ifdef DEBUG_SRC
-               debug_printf("remove from list %p src %p:%s\n",
-                            srcs, src, src->file);
-#endif
                free(file);
                break;
            }



Home | Main Index | Thread Index | Old Index