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

Diff for /src/usr.bin/make/engine.c between version 1.68 and 1.69

version 1.68, 2020/01/16 16:07:18 version 1.69, 2020/01/26 12:41:21
Line 241 
Line 241 
 Job_Touch(GNode *gn)  Job_Touch(GNode *gn)
 {  {
         handle_all_signals();          handle_all_signals();
         if (gn->type & (OP_JOIN|OP_USE|OP_EXEC|OP_OPTIONAL|OP_PHONY)) {          if (gn->type & (OP_USE|OP_OPTIONAL|OP_PHONY)) {
                 /*                  /*
                  * .JOIN, .USE, and .OPTIONAL targets are "virtual" targets                   * .JOIN, .USE, and .OPTIONAL targets are "virtual" targets
                  * and, as such, shouldn't really be created.                   * and, as such, shouldn't really be created.
Line 347 
Line 347 
   
         for (ln = Lst_First(&gn->children); ln != NULL; ln = Lst_Adv(ln)) {          for (ln = Lst_First(&gn->children); ln != NULL; ln = Lst_Adv(ln)) {
                 child = Lst_Datum(ln);                  child = Lst_Datum(ln);
                 if ((child->type & (OP_EXEC|OP_USE|OP_INVISIBLE)) != 0)                  if ((child->type & (OP_USE|OP_INVISIBLE)) != 0)
                         continue;                          continue;
                 if (OP_NOP(child->type) ||                  if (OP_NOP(child->type) ||
                     (target = Var(TARGET_INDEX, child)) == NULL) {                      (target = Var(TARGET_INDEX, child)) == NULL) {
Line 371 
Line 371 
                  * hosed.                   * hosed.
                  */                   */
                 do_oodate = false;                  do_oodate = false;
                 if (gn->type & OP_JOIN) {                  if (is_strictly_before(gn->mtime, child->mtime) ||
                         if (child->built_status == REBUILT)  
                                 do_oodate = true;  
                 } else if (is_strictly_before(gn->mtime, child->mtime) ||  
                    (!is_strictly_before(child->mtime, starttime) &&                     (!is_strictly_before(child->mtime, starttime) &&
                    child->built_status == REBUILT))                     child->built_status == REBUILT))
                         do_oodate = true;                          do_oodate = true;
Line 413 
Line 410 
   
         if (gn->impliedsrc)          if (gn->impliedsrc)
                 Var(IMPSRC_INDEX, gn) = Var(TARGET_INDEX, gn->impliedsrc);                  Var(IMPSRC_INDEX, gn) = Var(TARGET_INDEX, gn->impliedsrc);
   
         if (gn->type & OP_JOIN)  
                 Var(TARGET_INDEX, gn) = Var(ALLSRC_INDEX, gn);  
 }  }
   
 /* Wrapper to call Make_TimeStamp from a forEach loop.  */  /* Wrapper to call Make_TimeStamp from a forEach loop.  */
Line 434 
Line 428 
          * Certain types of targets needn't even be sought as their datedness           * Certain types of targets needn't even be sought as their datedness
          * doesn't depend on their modification time...           * doesn't depend on their modification time...
          */           */
         if ((gn->type & (OP_JOIN|OP_USE|OP_EXEC|OP_PHONY)) == 0) {          if ((gn->type & (OP_USE|OP_PHONY)) == 0) {
                 (void)Dir_MTime(gn);                  (void)Dir_MTime(gn);
                 if (DEBUG(MAKE)) {                  if (DEBUG(MAKE)) {
                         if (!is_out_of_date(gn->mtime))                          if (!is_out_of_date(gn->mtime))
Line 462 
Line 456 
                 if (DEBUG(MAKE))                  if (DEBUG(MAKE))
                         printf(".USE node...");                          printf(".USE node...");
                 oodate = false;                  oodate = false;
         } else if (gn->type & OP_JOIN) {          } else if (gn->type & (OP_FORCE|OP_PHONY)) {
                 /*  
                  * A target with the .JOIN attribute is only considered  
                  * out-of-date if any of its children was out-of-date.  
                  */  
                 if (DEBUG(MAKE))  
                         printf(".JOIN node...");  
                 oodate = gn->child_rebuilt;  
         } else if (gn->type & (OP_FORCE|OP_EXEC|OP_PHONY)) {  
                 /*                  /*
                  * A node which is the object of the force (!) operator or which                   * A node which is the object of the force (!) operator or which
                  * has the .EXEC attribute is always considered out-of-date.                   * has the .EXEC attribute is always considered out-of-date.

Legend:
Removed from v.1.68  
changed lines
  Added in v.1.69