make(1): make debug logging more precise in Suff_EndTransform

This commit is contained in:
rillig 2020-11-21 09:19:46 +00:00
parent 71013d7845
commit 6adf3573af
1 changed files with 5 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: suff.c,v 1.253 2020/11/21 09:16:44 rillig Exp $ */ /* $NetBSD: suff.c,v 1.254 2020/11/21 09:19:46 rillig Exp $ */
/* /*
* Copyright (c) 1988, 1989, 1990, 1993 * Copyright (c) 1988, 1989, 1990, 1993
@ -114,7 +114,7 @@
#include "dir.h" #include "dir.h"
/* "@(#)suff.c 8.4 (Berkeley) 3/21/94" */ /* "@(#)suff.c 8.4 (Berkeley) 3/21/94" */
MAKE_RCSID("$NetBSD: suff.c,v 1.253 2020/11/21 09:16:44 rillig Exp $"); MAKE_RCSID("$NetBSD: suff.c,v 1.254 2020/11/21 09:19:46 rillig Exp $");
#define SUFF_DEBUG0(text) DEBUG0(SUFF, text) #define SUFF_DEBUG0(text) DEBUG0(SUFF, text)
#define SUFF_DEBUG1(fmt, arg1) DEBUG1(SUFF, fmt, arg1) #define SUFF_DEBUG1(fmt, arg1) DEBUG1(SUFF, fmt, arg1)
@ -562,12 +562,11 @@ Suff_EndTransform(GNode *gn)
if (!SuffParseTransform(gn->name, &srcSuff, &targSuff)) if (!SuffParseTransform(gn->name, &srcSuff, &targSuff))
return; return;
/* Remember parents since srcSuff could be deleted in SuffList_Remove. */ SUFF_DEBUG2("deleting incomplete transformation from `%s' to `%s'\n",
srcSuffParents = srcSuff->parents;
SUFF_DEBUG2("deleting transformation from `%s' to `%s'\n",
srcSuff->name, targSuff->name); srcSuff->name, targSuff->name);
/* Remember parents since srcSuff could be deleted in SuffList_Remove. */
srcSuffParents = srcSuff->parents;
SuffList_Remove(targSuff->children, srcSuff); SuffList_Remove(targSuff->children, srcSuff);
SuffList_Remove(srcSuffParents, targSuff); SuffList_Remove(srcSuffParents, targSuff);
} }