[BACK]Return to parse.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / make

Diff for /src/usr.bin/make/parse.c between version 1.121 and 1.122

version 1.121, 2018/09/20 11:41:28 version 1.122, 2019/12/21 15:29:25
Line 240 
Line 240 
  *   *
  * Side Effects:   * Side Effects:
  *      New elements are added to the parents list of cgn and the   *      New elements are added to the parents list of cgn and the
  *      children list of cgn. the unmade field of pgn is updated   *      children list of cgn. the children_left field of pgn is updated
  *      to reflect the additional child.   *      to reflect the additional child.
  *---------------------------------------------------------------------   *---------------------------------------------------------------------
  */   */
Line 250 
Line 250 
         if (Lst_AddNew(&pgn->children, cgn)) {          if (Lst_AddNew(&pgn->children, cgn)) {
                 if (specType == SPECIAL_NONE)                  if (specType == SPECIAL_NONE)
                         Lst_AtEnd(&cgn->parents, pgn);                          Lst_AtEnd(&cgn->parents, pgn);
                 pgn->unmade++;                  pgn->children_left++;
         }          }
 }  }
   
Line 361 
Line 361 
 ParseAddDep(GNode *p, GNode *s)  ParseAddDep(GNode *p, GNode *s)
 {  {
         if (p->order < s->order) {          if (p->order < s->order) {
                 /* XXX: This can cause loops, and loops can cause unmade                  /* XXX: This can cause cycles but finding them is hard
                  * targets, but checking is tedious, and the debugging output                   * and debugging output will show the problem.  */
                  * can show the problem.  */                  Lst_AtEnd(&s->predecessors, p);
                 Lst_AtEnd(&p->successors, s);                  Lst_AtEnd(&p->successors, s);
                 Lst_AtEnd(&s->preds, p);  
                 return 1;                  return 1;
         } else          } else
                 return 0;                  return 0;
Line 438 
Line 437 
                  */                   */
                 if (predecessor != NULL) {                  if (predecessor != NULL) {
                         Lst_AtEnd(&predecessor->successors, gn);                          Lst_AtEnd(&predecessor->successors, gn);
                         Lst_AtEnd(&gn->preds, predecessor);                          Lst_AtEnd(&gn->predecessors, predecessor);
                 }                  }
                 predecessor = gn;                  predecessor = gn;
                 break;                  break;

Legend:
Removed from v.1.121  
changed lines
  Added in v.1.122