From ce14db1fcdf652d677429fb2582241452c75705f Mon Sep 17 00:00:00 2001 From: mycroft Date: Thu, 16 Sep 1999 00:49:48 +0000 Subject: [PATCH] Fix a bug in the previous. In the `compat' case, we don't actually use the list of target nodes returned by Make_ExpandUse(). We have to search the cohorts explicitly while iterating through the tree. So, tweak CompatMake() to do this. --- usr.bin/make/compat.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c index d4b81cef7c85..b1d82f1134ee 100644 --- a/usr.bin/make/compat.c +++ b/usr.bin/make/compat.c @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.27 1999/03/24 13:19:26 sommerfe Exp $ */ +/* $NetBSD: compat.c,v 1.28 1999/09/16 00:49:48 mycroft Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -39,14 +39,14 @@ */ #ifdef MAKE_BOOTSTRAP -static char rcsid[] = "$NetBSD: compat.c,v 1.27 1999/03/24 13:19:26 sommerfe Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.28 1999/09/16 00:49:48 mycroft Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.27 1999/03/24 13:19:26 sommerfe Exp $"); +__RCSID("$NetBSD: compat.c,v 1.28 1999/09/16 00:49:48 mycroft Exp $"); #endif #endif /* not lint */ #endif @@ -394,7 +394,7 @@ CompatMake (gnp, pgnp) if ((gn->flags & REMAKE) == 0) { gn->made = ABORTED; pgn->flags &= ~REMAKE; - return (0); + goto cohorts; } if (Lst_Member (gn->iParents, pgn) != NILLNODE) { @@ -418,7 +418,7 @@ CompatMake (gnp, pgnp) if (DEBUG(MAKE)) { printf("up-to-date.\n"); } - return (0); + goto cohorts; } else if (DEBUG(MAKE)) { printf("out-of-date.\n"); } @@ -519,6 +519,8 @@ CompatMake (gnp, pgnp) } } +cohorts: + Lst_ForEach (gn->cohorts, CompatMake, pgnp); return (0); }