Ignore:
Timestamp:
Oct 29, 2008, 1:37:51 AM (17 years ago)
Author:
bird
Message:

Merged in current GNU Make code (CVS from 2008-10-28). Ref #55.

File:
1 edited

Legend:

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

    r1971 r1993  
    11/* Basic dependency engine for GNU Make.
    22Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
    3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
     31998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
    44Foundation, Inc.
    55This file is part of GNU Make.
     
    77GNU Make is free software; you can redistribute it and/or modify it under the
    88terms of the GNU General Public License as published by the Free Software
    9 Foundation; either version 2, or (at your option) any later version.
     9Foundation; either version 3 of the License, or (at your option) any later
     10version.
    1011
    1112GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
     
    1415
    1516You should have received a copy of the GNU General Public License along with
    16 GNU Make; see the file COPYING.  If not, write to the Free Software
    17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.  */
     17this program.  If not, see <http://www.gnu.org/licenses/>.  */
    1818
    1919#include "make.h"
     
    504504      && default_file != 0 && default_file->cmds != 0)
    505505    {
    506       DBF (DB_IMPLICIT, _("Using default commands for `%s'.\n"));
     506      DBF (DB_IMPLICIT, _("Using default recipe for `%s'.\n"));
    507507      file->cmds = default_file->cmds;
    508508    }
     
    811811      must_make = 0;
    812812      DBF (DB_VERBOSE,
    813            _("No commands for `%s' and no prerequisites actually changed.\n"));
     813           _("No recipe for `%s' and no prerequisites actually changed.\n"));
    814814    }
    815815  else if (!must_make && file->cmds != 0 && always_make_flag)
     
    861861  if (file->command_state != cs_finished)
    862862    {
    863       DBF (DB_VERBOSE, _("Commands of `%s' are being run.\n"));
     863      DBF (DB_VERBOSE, _("Recipe of `%s' is being run.\n"));
    864864      return 0;
    865865    }
     
    903903  DB (DB_JOBS, (_("notice_finished_file - entering: file=%p `%s' update_status=%d command_state=%d\n"), /* bird */
    904904                  file, file->name, file->update_status, file->command_state));
     905
    905906  file->command_state = cs_finished;
    906907  file->updated = 1;
     
    11641165             file on whose behalf we are checking.  */
    11651166          struct dep *lastd;
     1167          int deps_running = 0;
     1168
     1169          /* Reset this target's state so that we check it fresh.  It could be
     1170             that it's already been checked as part of an order-only
     1171             prerequisite and so wasn't rebuilt then, but should be now.  */
     1172          set_command_state (file, cs_not_started);
    11661173
    11671174          lastd = 0;
     
    12021209              if (d->file->command_state == cs_running
    12031210                  || d->file->command_state == cs_deps_running)
    1204                 /* Record that some of FILE's deps are still being made.
    1205                    This tells the upper levels to wait on processing it until
    1206                    the commands are finished.  */
    1207                 set_command_state (file, cs_deps_running);
     1211                deps_running = 1;
    12081212
    12091213              lastd = d;
    12101214              d = d->next;
    12111215            }
     1216
     1217          if (deps_running)
     1218            /* Record that some of FILE's deps are still being made.
     1219               This tells the upper levels to wait on processing it until the
     1220               commands are finished.  */
     1221            set_command_state (file, cs_deps_running);
    12121222        }
    12131223    }
     
    14821492                 + ((FILE_TIMESTAMP_NS (mtime) - FILE_TIMESTAMP_NS (now))
    14831493                    / 1e9));
    1484               error (NILF, _("Warning: File `%s' has modification time %.2g s in the future"),
    1485                      file->name, from_now);
     1494              char from_now_string[100];
     1495
     1496              if (from_now >= 99 && from_now <= ULONG_MAX)
     1497                sprintf (from_now_string, "%lu", (unsigned long) from_now);
     1498              else
     1499                sprintf (from_now_string, "%.2g", from_now);
     1500              error (NILF, _("Warning: File `%s' has modification time %s s in the future"),
     1501                     file->name, from_now_string);
    14861502#endif
    14871503              clock_skew_detected = 1;
Note: See TracChangeset for help on using the changeset viewer.