Ignore:
Timestamp:
May 25, 2007, 5:27:53 AM (18 years ago)
Author:
bird
Message:

multi target explicit rules. partly done.

File:
1 edited

Legend:

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

    r919 r921  
    750750    }
    751751
    752   DBF (DB_BASIC, _("Must remake target `%s'.\n"));
     752#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
     753  if (ISDB(DB_BASIC) && file->multi_head && file->multi_head != file)
     754    DBS (DB_BASIC, (_("Must remake target `%s' - primary target `%s'.\n"), file->name, file->multi_head->name));
     755  else
     756#endif
     757    DBF (DB_BASIC, _("Must remake target `%s'.\n"));
    753758
    754759  /* It needs to be remade.  If it's VPATH and not reset via GPATH, toss the
     
    917922
    918923  if (ran && file->update_status != -1)
    919     /* We actually tried to update FILE, which has
    920        updated its also_make's as well (if it worked).
    921        If it didn't work, it wouldn't work again for them.
    922        So mark them as updated with the same status.  */
    923     for (d = file->also_make; d != 0; d = d->next)
    924       {
    925         d->file->command_state = cs_finished;
    926         d->file->updated = 1;
    927         d->file->update_status = file->update_status;
    928 
    929         if (ran && !d->file->phony)
    930           /* Fetch the new modification time.
    931              We do this instead of just invalidating the cached time
    932              so that a vpath_search can happen.  Otherwise, it would
    933              never be done because the target is already updated.  */
    934           f_mtime (d->file, 0);
    935       }
     924#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
     925    {
     926#endif
     927      /* We actually tried to update FILE, which has
     928         updated its also_make's as well (if it worked).
     929         If it didn't work, it wouldn't work again for them.
     930         So mark them as updated with the same status.  */
     931      for (d = file->also_make; d != 0; d = d->next)
     932        {
     933          d->file->command_state = cs_finished;
     934          d->file->updated = 1;
     935          d->file->update_status = file->update_status;
     936
     937          if (ran && !d->file->phony)
     938            /* Fetch the new modification time.
     939               We do this instead of just invalidating the cached time
     940               so that a vpath_search can happen.  Otherwise, it would
     941               never be done because the target is already updated.  */
     942            f_mtime (d->file, 0);
     943        }
     944#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
     945      /* Same as above but for explicit multi target rules. */
     946      if (file->multi_head)
     947        {
     948          struct file *f2;
     949          assert (file == file->multi_head);
     950          for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next)
     951            {
     952              f2->command_state = cs_finished;
     953              f2->updated = 1;
     954              f2->update_status = file->update_status;
     955
     956              if (!f2->phony)
     957                f_mtime (f2, 0);
     958            }
     959        }
     960    }
     961#endif
    936962  else if (file->update_status == -1)
    937963    /* Nothing was done for FILE, but it needed nothing done.
     
    11161142remake_file (struct file *file)
    11171143{
     1144#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
     1145  /* Always operate on the primary file. */
     1146  if (file->multi_head && file->multi_head != file)
     1147    file = file->multi_head;
     1148#endif
     1149
    11181150  if (file->cmds == 0)
    11191151    {
Note: See TracChangeset for help on using the changeset viewer.