From 5864a961653eb9afd806f675b08ad584ce78c5a5 Mon Sep 17 00:00:00 2001 From: fjoe Date: Sun, 25 Nov 2007 20:43:27 +0000 Subject: [PATCH] Fix -jX when makefiles are remade. --- usr.bin/make/main.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index fea219306689..b683f8547cf6 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -808,6 +808,22 @@ Remake_Makefiles(void) printf("`%s' not remade because of errors.\n", gn->name); error_cnt++; + } else if (gn->made == UPTODATE) { + Lst examine; + + Lst_Init(&examine); + Lst_EnQueue(&examine, gn); + while (!Lst_IsEmpty(&examine)) { + LstNode *eln; + GNode *egn = Lst_DeQueue(&examine); + + egn->make = FALSE; + LST_FOREACH(eln, &egn->children) { + GNode *cgn = Lst_Datum(eln); + + Lst_EnQueue(&examine, cgn); + } + } } }