diff options
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/mk/mk.h | 1 | ||||
-rw-r--r-- | src/cmd/mk/recipe.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd/mk/mk.h b/src/cmd/mk/mk.h index a40e9ded..ca14e9d6 100644 --- a/src/cmd/mk/mk.h +++ b/src/cmd/mk/mk.h @@ -109,6 +109,7 @@ typedef struct Node #define NORECIPE 0x0400 #define DELETE 0x0800 #define NOMINUSE 0x1000 +#define ONLIST 0x2000 typedef struct Job { diff --git a/src/cmd/mk/recipe.c b/src/cmd/mk/recipe.c index 7993e091..60325198 100644 --- a/src/cmd/mk/recipe.c +++ b/src/cmd/mk/recipe.c @@ -70,10 +70,15 @@ dorecipe(Node *node) ww->next = newword(buf); ww = ww->next; if(n == node) continue; + if((n->flags&ONLIST) != 0) + continue; + n->flags |= ONLIST; n->next = node->next; node->next = n; } } + for(n = node->next; n; n = n->next) + n->flags &= ~ONLIST; for(n = node; n; n = n->next) if((n->flags&READY) == 0) return(did); |