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

Diff for /src/usr.bin/make/make.c between version 1.72 and 1.73

version 1.72, 2017/06/22 17:08:20 version 1.73, 2017/06/22 17:09:10
Line 117 
Line 117 
 static bool randomize_queue;  static bool randomize_queue;
 long random_delay = 0;  long random_delay = 0;
   
 bool  bool
 no_jobs_left()  no_jobs_left()
 {  {
         return Array_IsEmpty(&toBeMade);          return Array_IsEmpty(&toBeMade);
Line 131 
Line 131 
 /* no random delay in the new engine for now */  /* no random delay in the new engine for now */
 #if 0  #if 0
         if (Var_Definedi("RANDOM_DELAY", NULL))          if (Var_Definedi("RANDOM_DELAY", NULL))
                 random_delay = strtonum(Var_Value("RANDOM_DELAY"), 0, 1000,                  random_delay = strtonum(Var_Value("RANDOM_DELAY"), 0, 1000,
                     NULL) * 1000000;                      NULL) * 1000000;
 #endif  #endif
   
Line 170 
Line 170 
   
                 if (pgn->must_make && pgn->built_status == UNKNOWN) {                  if (pgn->must_make && pgn->built_status == UNKNOWN) {
                         if (DEBUG(MAKE))                          if (DEBUG(MAKE))
                                 printf("predecessor %s not made yet.\n",                                  printf("predecessor %s not made yet.\n",
                                     pgn->name);                                      pgn->name);
                         return true;                          return true;
                 }                  }
Line 189 
Line 189 
         for (ln = Lst_First(&gn->successors); ln != NULL; ln = Lst_Adv(ln)) {          for (ln = Lst_First(&gn->successors); ln != NULL; ln = Lst_Adv(ln)) {
                 GNode   *succ = Lst_Datum(ln);                  GNode   *succ = Lst_Datum(ln);
   
                 if (succ->must_make && succ->unmade == 0                  if (succ->must_make && succ->unmade == 0
                     && succ->built_status == UNKNOWN)                      && succ->built_status == UNKNOWN)
                         Array_PushNew(&toBeMade, succ);                          Array_PushNew(&toBeMade, succ);
         }          }
Line 206 
Line 206 
                         j--;                          j--;
                         heldBack.a[i]->built_status = UNKNOWN;                          heldBack.a[i]->built_status = UNKNOWN;
                         if (DEBUG(HELDJOBS))                          if (DEBUG(HELDJOBS))
                                 printf("%s finished, releasing: %s\n",                                  printf("%s finished, releasing: %s\n",
                                     gn->name, heldBack.a[i]->name);                                      gn->name, heldBack.a[i]->name);
                         Array_Push(&toBeMade, heldBack.a[i]);                          Array_Push(&toBeMade, heldBack.a[i]);
                         continue;                          continue;
Line 263 
Line 263 
                 if (noExecute || is_out_of_date(Dir_MTime(cgn)))                  if (noExecute || is_out_of_date(Dir_MTime(cgn)))
                         clock_gettime(CLOCK_REALTIME, &cgn->mtime);                          clock_gettime(CLOCK_REALTIME, &cgn->mtime);
                 if (DEBUG(MAKE))                  if (DEBUG(MAKE))
                         printf("update time: %s\n",                          printf("update time: %s\n",
                             time_to_string(&cgn->mtime));                              time_to_string(&cgn->mtime));
         }          }
   
Line 275 
Line 275 
                 pgn->unmade--;                  pgn->unmade--;
                 if (pgn->must_make) {                  if (pgn->must_make) {
                         if (DEBUG(MAKE))                          if (DEBUG(MAKE))
                                 printf("%s--=%d ",                                  printf("%s--=%d ",
                                     pgn->name, pgn->unmade);                                      pgn->name, pgn->unmade);
   
                         if ( ! (cgn->type & (OP_EXEC|OP_USE))) {                          if ( ! (cgn->type & (OP_EXEC|OP_USE))) {
Line 348 
Line 348 
                                 gn->built_status = HELDBACK;                                  gn->built_status = HELDBACK;
                                 if (DEBUG(HELDJOBS))                                  if (DEBUG(HELDJOBS))
                                         printf("Holding back job %s, "                                          printf("Holding back job %s, "
                                             "groupling to %s\n",                                              "groupling to %s\n",
                                             gn->name, gn2->name);                                              gn->name, gn2->name);
                                 Array_Push(&heldBack, gn);                                  Array_Push(&heldBack, gn);
                                 return false;                                  return false;
Line 362 
Line 362 
                                 gn->built_status = HELDBACK;                                  gn->built_status = HELDBACK;
                                 if (DEBUG(HELDJOBS))                                  if (DEBUG(HELDJOBS))
                                         printf("Holding back job %s, "                                          printf("Holding back job %s, "
                                             "sibling to %s\n",                                              "sibling to %s\n",
                                             gn->name, gn2->name);                                              gn->name, gn2->name);
                                 Array_Push(&heldBack, gn);                                  Array_Push(&heldBack, gn);
                                 return false;                                  return false;
Line 454 
Line 454 
                 Make_HandleUse(cgn, pgn);                  Make_HandleUse(cgn, pgn);
 }  }
   
 /* Add stuff to the toBeMade queue. we try to sort things so that stuff  /* Add stuff to the toBeMade queue. we try to sort things so that stuff
  * that can be done directly is done right away.  This won't be perfect,   * that can be done directly is done right away.  This won't be perfect,
  * since some dependencies are only discovered later (e.g., SuffFindDeps).   * since some dependencies are only discovered later (e.g., SuffFindDeps).
  */   */
Line 601 
Line 601 
         bool cycle = false;          bool cycle = false;
         bool first = true;          bool first = true;
   
         for (gn = ohash_first(&targets, &i); gn != NULL;          for (gn = ohash_first(&targets, &i); gn != NULL;
             gn = ohash_next(&targets, &i)) {              gn = ohash_next(&targets, &i)) {
                 if (has_been_built(gn))                  if (has_been_built(gn))
                         continue;                          continue;
Line 684 
Line 684 
                 if (gn->built_status == UPTODATE)                  if (gn->built_status == UPTODATE)
                         continue;                          continue;
                 if (gn->unmade != 0) {                  if (gn->unmade != 0) {
                         GNode *c;                          GNode *c;
   
                         gn->in_cycle = true;                          gn->in_cycle = true;
                         Array_Push(cycle, gn);                          Array_Push(cycle, gn);

Legend:
Removed from v.1.72  
changed lines
  Added in v.1.73