VirtualBox

Changeset 1110 in kBuild


Ignore:
Timestamp:
Sep 25, 2007 3:04:41 AM (18 years ago)
Author:
bird
Message:

More CONFIG_WITH_EXPLICIT_MULTITARGET hacking. Have to deal with non-run stuff, or we'll get into endless loops.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/remake.c

    r1021 r1110  
    450450  this_mtime = file_mtime (file);
    451451  f3 = file;
    452   for (f2 = file->multi_next; 
    453        f2 != NULL && this_mtime != NONEXISTENT_MTIME; 
     452  for (f2 = file->multi_next;
     453       f2 != NULL && this_mtime != NONEXISTENT_MTIME;
    454454       f2 = f2->multi_next)
    455455    if (!f2->multi_maybe)
     
    539539                  continue;
    540540                }
    541 #endif 
     541#endif
    542542
    543543              error (NILF, _("Circular %s <- %s dependency dropped."),
     
    546546#else
    547547                     file->name, d->file->name);
    548 #endif 
     548#endif
    549549              /* We cannot free D here because our the caller will still have
    550550                 a reference to it when we were called recursively via
     
    555555#else
    556556                file->deps = d->next;
    557 #endif 
     557#endif
    558558              else
    559559                lastd->next = d->next;
     
    566566#else
    567567          d->file->parent = file;
    568 #endif 
     568#endif
    569569          maybe_make = must_make;
    570570   
     
    617617        break;
    618618    }
    619 #endif 
     619#endif
    620620
    621621  /* Now we know whether this target needs updating.
     
    640640#else
    641641              d->file->parent = file;
    642 #endif 
     642#endif
    643643   
    644644              /* Inherit dontcare flag from our parent. */
     
    679679#else
    680680                d->changed = ((file->phony && file->cmds != 0)
    681 #endif 
     681#endif
    682682                            || file_mtime (d->file) != mtime);
    683683            }
     
    739739        if (d->file == file && f2->multi_maybe)
    740740          continue;
    741 #endif 
     741#endif
    742742        check_renamed (d->file);
    743743 
     
    891891notice_finished_file (struct file *file)
    892892{
     893#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
     894  struct file *f2;
     895#endif
    893896  struct dep *d;
    894897  int ran = file->command_state == cs_running;
     
    898901  file->command_state = cs_finished;
    899902  file->updated = 1;
     903#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
     904  if (file->multi_head)
     905    {
     906      assert (file == file->multi_head);
     907      for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next)
     908        {
     909          f2->command_state = cs_finished;
     910          f2->updated = 1;
     911        }
     912    }
     913#endif
    900914
    901915#ifdef CONFIG_WITH_EXTENDED_NOTPARALLEL
     
    934948        have_nonrecursing:
    935949          if (file->phony)
     950#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
     951            {
     952              file->update_status = 0;
     953              if (file->multi_head)
     954                for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next)
     955                  f2->update_status = 0;
     956            }
     957#else
    936958            file->update_status = 0;
     959#endif
    937960          /* According to POSIX, -t doesn't affect targets with no cmds.  */
    938961          else if (file->cmds != 0)
     
    940963              /* Should set file's modification date and do nothing else.  */
    941964              file->update_status = touch_file (file);
     965#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
     966              if (file->multi_head)
     967                for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next)
     968                  {
     969                    /* figure out this, touch if it exist ignore otherwise? */
     970                  }
     971#endif
    942972
    943973              /* Pretend we ran a real touch command, to suppress the
     
    956986  if (file->mtime_before_update == UNKNOWN_MTIME)
    957987    file->mtime_before_update = file->last_mtime;
     988#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
     989  if (file->multi_head)
     990    for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next)
     991      if (f2->mtime_before_update == UNKNOWN_MTIME)
     992        f2->mtime_before_update = f2->last_mtime;
     993#endif
    958994
    959995  if ((ran && !file->phony) || touched)
     
    9781014
    9791015      file->last_mtime = i == 0 ? UNKNOWN_MTIME : NEW_MTIME;
     1016#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
     1017      if (file->multi_head)
     1018        for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next)
     1019          file->last_mtime = i == 0 ? UNKNOWN_MTIME : NEW_MTIME; /*??*/
     1020#endif
    9801021    }
    9811022
     
    10321073      /* Same as above but for explicit multi target rules. */
    10331074      if (file->multi_head)
    1034         {
    1035           struct file *f2;
    1036           assert (file == file->multi_head);
    1037           for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next)
    1038             {
    1039               f2->command_state = cs_finished;
    1040               f2->updated = 1;
    1041               f2->update_status = file->update_status;
    1042 
    1043               if (!f2->phony)
    1044                 f_mtime (f2, 0);
    1045             }
    1046         }
     1075        for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next)
     1076          {
     1077            f2->update_status = file->update_status;
     1078            if (!f2->phony)
     1079              f_mtime (f2, 0);
     1080          }
    10471081    }
    10481082#endif
    10491083  else if (file->update_status == -1)
     1084#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
     1085    {
     1086      /* Nothing was done for FILE, but it needed nothing done.
     1087         So mark it now as "succeeded".  */
     1088      file->update_status = 0;
     1089      if (file->multi_head)
     1090        for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next)
     1091          f2->update_status = 0;
     1092    }
     1093#else
    10501094    /* Nothing was done for FILE, but it needed nothing done.
    10511095       So mark it now as "succeeded".  */
    10521096    file->update_status = 0;
     1097#endif
    10531098}
    10541099
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette