10
Word head, ahead, lp, ln, *w, *ww, *aw;
18
for(a = node->prereqs; a; a = a->next)
22
no recipe? go to buggery!
25
if(!(node->flags&VIRTUAL) && !(node->flags&NORECIPE)){
26
fprint(2, "mk: no recipe to make '%s'\n", node->name);
29
if(strchr(node->name, '(') && node->time == 0)
34
if(!(node->flags&VIRTUAL))
37
Bprint(&bout, "no touch of virtual '%s'\n", node->name);
50
ww->next = newword(node->name);
51
aw->next = newword(node->name);
53
for(w = r->alltargets; w; w = w->next){
55
subst(aa->stem, w->s, buf);
58
aw->next = newword(buf);
60
if((s = symlook(buf, S_NODE, 0)) == 0)
61
continue; /* not a node we are interested in */
63
if(aflag == 0 && n->time) {
64
for(a = n->prereqs; a; a = a->next)
65
if(a->n && outofdate(n, a, 0))
70
ww->next = newword(buf);
72
if(n == node) continue;
77
for(n = node; n; n = n->next)
78
if((n->flags&READY) == 0)
81
gather the params for the job
83
lp.next = ln.next = 0;
84
for(n = node; n; n = n->next){
85
for(a = n->prereqs; a; a = a->next){
87
addw(&lp, a->n->name);
88
if(outofdate(n, a, 0)){
89
addw(&ln, a->n->name);
91
fprint(1, "%s(%ld) < %s(%ld)\n",
92
n->name, n->time, a->n->name, a->n->time);
96
fprint(1, "%s has no prerequisites\n",
100
MADESET(n, BEINGMADE);
102
/*print("lt=%s ln=%s lp=%s\n",wtos(head.next, ' '),wtos(ln.next, ' '),wtos(lp.next, ' '));*//**/
103
run(newjob(r, node, aa->stem, aa->match, lp.next, ln.next, head.next, ahead.next));
108
addw(Word *w, char *s)
112
for(lw = w; w = w->next; lw = w){
113
if(strcmp(s, w->s) == 0)
116
lw->next = newword(s);