[BACK]Return to make.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / usr.bin / make

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/usr.bin/make/make.c between version 1.56 and 1.57

version 1.56, 2005/02/16 15:11:52 version 1.57, 2005/07/25 22:55:58
Line 208  Make_OODate(GNode *gn)
Line 208  Make_OODate(GNode *gn)
      * doesn't depend on their modification time...       * doesn't depend on their modification time...
      */       */
     if ((gn->type & (OP_JOIN|OP_USE|OP_USEBEFORE|OP_EXEC)) == 0) {      if ((gn->type & (OP_JOIN|OP_USE|OP_USEBEFORE|OP_EXEC)) == 0) {
         (void) Dir_MTime(gn);          (void)Dir_MTime(gn);
         if (DEBUG(MAKE)) {          if (DEBUG(MAKE)) {
             if (gn->mtime != 0) {              if (gn->mtime != 0) {
                 printf ("modified %s...", Targ_FmtTime(gn->mtime));                  printf("modified %s...", Targ_FmtTime(gn->mtime));
             } else {              } else {
                 printf ("non-existent...");                  printf("non-existent...");
             }              }
         }          }
     }      }
Line 355  MakeAddChild(ClientData gnp, ClientData 
Line 355  MakeAddChild(ClientData gnp, ClientData 
     Lst            l = (Lst) lp;      Lst            l = (Lst) lp;
   
     if ((gn->flags & REMAKE) == 0 && !(gn->type & (OP_USE|OP_USEBEFORE))) {      if ((gn->flags & REMAKE) == 0 && !(gn->type & (OP_USE|OP_USEBEFORE))) {
         (void)Lst_EnQueue (l, (ClientData)gn);          (void)Lst_EnQueue(l, (ClientData)gn);
     }      }
     return (0);      return (0);
 }  }
Line 383  MakeFindChild(ClientData gnp, ClientData
Line 383  MakeFindChild(ClientData gnp, ClientData
     GNode          *gn = (GNode *) gnp;      GNode          *gn = (GNode *) gnp;
     GNode          *pgn = (GNode *) pgnp;      GNode          *pgn = (GNode *) pgnp;
   
     (void) Dir_MTime(gn);      (void)Dir_MTime(gn);
     Make_TimeStamp(pgn, gn);      Make_TimeStamp(pgn, gn);
     pgn->unmade--;      pgn->unmade--;
   
Line 435  Make_HandleUse(GNode *cgn, GNode *pgn)
Line 435  Make_HandleUse(GNode *cgn, GNode *pgn)
                  */                   */
                 Lst cmds = pgn->commands;                  Lst cmds = pgn->commands;
                 pgn->commands = Lst_Duplicate(cgn->commands, NOCOPY);                  pgn->commands = Lst_Duplicate(cgn->commands, NOCOPY);
                 (void) Lst_Concat(pgn->commands, cmds, LST_CONCNEW);                  (void)Lst_Concat(pgn->commands, cmds, LST_CONCNEW);
                 Lst_Destroy(cmds, NOFREE);                  Lst_Destroy(cmds, NOFREE);
             } else {              } else {
                 /*                  /*
                  * .USE or target has no commands --                   * .USE or target has no commands --
                  *      append the child's commands to the parent.                   *      append the child's commands to the parent.
                  */                   */
                 (void) Lst_Concat(pgn->commands, cgn->commands, LST_CONCNEW);                  (void)Lst_Concat(pgn->commands, cgn->commands, LST_CONCNEW);
             }              }
     }      }
   
     if (Lst_Open(cgn->children) == SUCCESS) {      if (Lst_Open(cgn->children) == SUCCESS) {
         while ((ln = Lst_Next(cgn->children)) != NILLNODE) {          while ((ln = Lst_Next(cgn->children)) != NILLNODE) {
             GNode *tgn, *gn = (GNode *)Lst_Datum (ln);              GNode *tgn, *gn = (GNode *)Lst_Datum(ln);
   
             /*              /*
              * Expand variables in the .USE node's name               * Expand variables in the .USE node's name
Line 470  Make_HandleUse(GNode *cgn, GNode *pgn)
Line 470  Make_HandleUse(GNode *cgn, GNode *pgn)
                     gn = tgn;                      gn = tgn;
             }              }
   
             (void) Lst_AtEnd(pgn->children, gn);              (void)Lst_AtEnd(pgn->children, gn);
             (void) Lst_AtEnd(gn->parents, pgn);              (void)Lst_AtEnd(gn->parents, pgn);
             pgn->unmade += 1;              pgn->unmade += 1;
         }          }
         Lst_Close(cgn->children);          Lst_Close(cgn->children);
Line 695  Make_Update(GNode *cgn)
Line 695  Make_Update(GNode *cgn)
     }      }
     if (Lst_Open(parents) == SUCCESS) {      if (Lst_Open(parents) == SUCCESS) {
         while ((ln = Lst_Next(parents)) != NILLNODE) {          while ((ln = Lst_Next(parents)) != NILLNODE) {
             pgn = (GNode *)Lst_Datum (ln);              pgn = (GNode *)Lst_Datum(ln);
             if (mtime == 0)              if (mtime == 0)
                 pgn->flags |= FORCE;                  pgn->flags |= FORCE;
             /*              /*
Line 709  Make_Update(GNode *cgn)
Line 709  Make_Update(GNode *cgn)
             if ( ! (cgn->type & (OP_EXEC|OP_USE|OP_USEBEFORE))) {              if ( ! (cgn->type & (OP_EXEC|OP_USE|OP_USEBEFORE))) {
                 if (cgn->made == MADE)                  if (cgn->made == MADE)
                     pgn->flags |= CHILDMADE;                      pgn->flags |= CHILDMADE;
                 (void)Make_TimeStamp (pgn, cgn);                  (void)Make_TimeStamp(pgn, cgn);
             }              }
   
             /*              /*
Line 726  Make_Update(GNode *cgn)
Line 726  Make_Update(GNode *cgn)
                  * Queue the node up -- any unmade predecessors will                   * Queue the node up -- any unmade predecessors will
                  * be dealt with in MakeStartJobs.                   * be dealt with in MakeStartJobs.
                  */                   */
                 (void)Lst_EnQueue (toBeMade, (ClientData)pgn);                  (void)Lst_EnQueue(toBeMade, (ClientData)pgn);
             } else if (pgn->unmade < 0) {              } else if (pgn->unmade < 0) {
                 Error("Graph cycles through %s", pgn->name);                  Error("Graph cycles through %s", pgn->name);
             }              }
Line 759  Make_Update(GNode *cgn)
Line 759  Make_Update(GNode *cgn)
         char    *cpref = Var_Value(PREFIX, cgn, &p1);          char    *cpref = Var_Value(PREFIX, cgn, &p1);
   
         while ((ln = Lst_Next(cgn->iParents)) != NILLNODE) {          while ((ln = Lst_Next(cgn->iParents)) != NILLNODE) {
             pgn = (GNode *)Lst_Datum (ln);              pgn = (GNode *)Lst_Datum(ln);
             if (pgn->flags & REMAKE) {              if (pgn->flags & REMAKE) {
                 Var_Set(IMPSRC, cname, pgn, 0);                  Var_Set(IMPSRC, cname, pgn, 0);
                 if (cpref != NULL)                  if (cpref != NULL)
Line 933  MakeStartJobs(void)
Line 933  MakeStartJobs(void)
     GNode       *gn;      GNode       *gn;
   
     while (!Lst_IsEmpty (toBeMade)) {      while (!Lst_IsEmpty (toBeMade)) {
         gn = (GNode *) Lst_DeQueue(toBeMade);          gn = (GNode *)Lst_DeQueue(toBeMade);
         if (DEBUG(MAKE)) {          if (DEBUG(MAKE)) {
             printf ("Examining %s...", gn->name);              printf("Examining %s...", gn->name);
         }          }
         /*          /*
          * Make sure any and all predecessors that are going to be made,           * Make sure any and all predecessors that are going to be made,
Line 974  MakeStartJobs(void)
Line 974  MakeStartJobs(void)
         numNodes--;          numNodes--;
         if (Make_OODate(gn)) {          if (Make_OODate(gn)) {
             if (DEBUG(MAKE)) {              if (DEBUG(MAKE)) {
                 printf ("out-of-date\n");                  printf("out-of-date\n");
             }              }
             if (queryFlag) {              if (queryFlag) {
                 return (TRUE);                  return (TRUE);
Line 983  MakeStartJobs(void)
Line 983  MakeStartJobs(void)
             Job_Make(gn);              Job_Make(gn);
         } else {          } else {
             if (DEBUG(MAKE)) {              if (DEBUG(MAKE)) {
                 printf ("up-to-date\n");                  printf("up-to-date\n");
             }              }
             gn->made = UPTODATE;              gn->made = UPTODATE;
             if (gn->type & OP_JOIN) {              if (gn->type & OP_JOIN) {
Line 1029  MakePrintStatus(ClientData gnp, ClientDa
Line 1029  MakePrintStatus(ClientData gnp, ClientDa
     GNode       *gn = (GNode *) gnp;      GNode       *gn = (GNode *) gnp;
     Boolean     cycle = *(Boolean *) cyclep;      Boolean     cycle = *(Boolean *) cyclep;
     if (gn->made == UPTODATE) {      if (gn->made == UPTODATE) {
         printf ("`%s' is up to date.\n", gn->name);          printf("`%s' is up to date.\n", gn->name);
     } else if (gn->unmade != 0) {      } else if (gn->unmade != 0) {
         if (cycle) {          if (cycle) {
             Boolean t = TRUE;              Boolean t = TRUE;
Line 1053  MakePrintStatus(ClientData gnp, ClientDa
Line 1053  MakePrintStatus(ClientData gnp, ClientDa
                 Lst_ForEach(gn->children, MakePrintStatus, (ClientData) &t);                  Lst_ForEach(gn->children, MakePrintStatus, (ClientData) &t);
             }              }
         } else {          } else {
             printf ("`%s' not remade because of errors.\n", gn->name);              printf("`%s' not remade because of errors.\n", gn->name);
         }          }
     }      }
     return (0);      return (0);
Line 1096  Make_ExpandUse(Lst targs)
Line 1096  Make_ExpandUse(Lst targs)
      * and go on about our business.       * and go on about our business.
      */       */
     while (!Lst_IsEmpty (examine)) {      while (!Lst_IsEmpty (examine)) {
         gn = (GNode *) Lst_DeQueue(examine);          gn = (GNode *)Lst_DeQueue(examine);
   
         if ((gn->type & OP_DOUBLEDEP) && !Lst_IsEmpty (gn->cohorts)) {          if ((gn->type & OP_DOUBLEDEP) && !Lst_IsEmpty (gn->cohorts)) {
             Lst new;              Lst new;
Line 1147  Make_ExpandUse(Lst targs)
Line 1147  Make_ExpandUse(Lst targs)
             if (gn->unmade != 0) {              if (gn->unmade != 0) {
                 Lst_ForEach(gn->children, MakeAddChild, (ClientData)examine);                  Lst_ForEach(gn->children, MakeAddChild, (ClientData)examine);
             } else {              } else {
                 (void)Lst_EnQueue (ntargs, (ClientData)gn);                  (void)Lst_EnQueue(ntargs, (ClientData)gn);
             }              }
         }          }
     }      }
Line 1202  Make_Run(Lst targs)
Line 1202  Make_Run(Lst targs)
          * the finishing of a job. So we fill the Job table as much as we can           * the finishing of a job. So we fill the Job table as much as we can
          * before going into our loop.           * before going into our loop.
          */           */
         (void) MakeStartJobs();          (void)MakeStartJobs();
     }      }
   
     /*      /*

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

CVSweb <webmaster@jp.NetBSD.org>