]> git.ipfire.org Git - thirdparty/make.git/commitdiff
removed updated member from struct filedef
authorTim Magill <magill@gate.net>
Wed, 9 Feb 2000 05:49:41 +0000 (05:49 +0000)
committerTim Magill <magill@gate.net>
Wed, 9 Feb 2000 05:49:41 +0000 (05:49 +0000)
ChangeLog
file.c
filedef.h
main.c
remake.c

index 3888642bc66d27bd589cb4c16dacede5a6465360..24e4d16b475d82cefe36d78a839d026316e1d06a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2000-02-09  Tim Magill <magill@gate.net>
+       Started branch for cleaning up internal make structure regarding
+       recursion paths.  Branch name is filedef-cleanup and was started
+       from a point on the mainline at filedef-cleanup-base.  either tags
+       are suitable for cvs commands.
+
+       * file.c, filedef.h, main.c, remake.c (updated): Removed updated
+       member from 'struct filedef'.  filedef->command_state fully
+       contains the same information and more.
+
+       
 2000-02-07  Paul D. Smith  <psmith@gnu.org>
 
        For += target-specific variables we need to remember which
diff --git a/file.c b/file.c
index a1003a98ffebc4c4f8b8acaea17fcea15d1b4b93..28de9422743bd41a64ad05c234f0dfb3a8f1d08b 100644 (file)
--- a/file.c
+++ b/file.c
@@ -361,7 +361,6 @@ in favor of those for `%s'."),
       MERGE (precious);
       MERGE (tried_implicit);
       MERGE (updating);
-      MERGE (updated);
       MERGE (is_target);
       MERGE (cmd_target);
       MERGE (phony);
@@ -659,7 +658,7 @@ print_file (f)
       file_timestamp_sprintf (buf, f->last_mtime);
       printf (_("#  Last modified %s\n"), buf);
     }
-  puts (f->updated
+  puts ((f->command_state == cs_finished)
         ? _("#  File has been updated.") : _("#  File has not been updated."));
   switch (f->command_state)
     {
index 8712e986b119bc2b128fdc67cb4c9b0f115445d5..dd4988db0cf74fe92dae3d8eedce3baa41030143 100644 (file)
--- a/filedef.h
+++ b/filedef.h
@@ -76,7 +76,6 @@ struct file
                                      for implicit rule for making
                                      this file; don't search again.  */
     unsigned int updating:1;   /* Nonzero while updating deps of this file */
-    unsigned int updated:1;    /* Nonzero if this file has been remade.  */
     unsigned int is_target:1;  /* Nonzero if file is described as target.  */
     unsigned int cmd_target:1; /* Nonzero if file was given on cmd line.  */
     unsigned int phony:1;      /* Nonzero if this is a phony file
diff --git a/main.c b/main.c
index 0cc72ec9305dce9cc20f1115b1a5ee3ba0169b30..824b614f8354f0c8d122560bf43c5b712baff38a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1254,7 +1254,6 @@ int main (int argc, char ** argv)
            /* Make sure the temporary file will not be remade.  */
             stdin_nm = savestring (name, sizeof (name) -1);
            f = enter_file (stdin_nm);
-           f->updated = 1;
            f->update_status = 0;
            f->command_state = cs_finished;
            /* Can't be intermediate, or it'll be removed too early for
@@ -1518,7 +1517,6 @@ int main (int argc, char ** argv)
       {
        f = enter_command_line_file (*p);
        f->last_mtime = f->mtime_before_update = (FILE_TIMESTAMP) 1;
-       f->updated = 1;
        f->update_status = 0;
        f->command_state = cs_finished;
       }
@@ -1633,7 +1631,7 @@ int main (int argc, char ** argv)
                    again to print an error.  */
                 d->file->considered = 0;
 
-                if (d->file->updated)
+                if (d->file->command_state == cs_finished)
                   {
                     /* This makefile was updated.  */
                     if (d->file->update_status == 0)
index d4c8a03aad0c68224c7e3a7fda7de9500c876e90..1abea0d228129c16644a669221cb4cea6b131f0c 100644 (file)
--- a/remake.c
+++ b/remake.c
@@ -156,7 +156,7 @@ update_goal_chain (goals, makefiles)
                  STATUS as it is if no updating was done.  */
 
              stop = 0;
-             if ((x != 0 || file->updated) && status < 1)
+             if ((x != 0 || (file->command_state == cs_finished)) && status < 1)
                 {
                   if (file->update_status != 0)
                     {
@@ -174,7 +174,7 @@ update_goal_chain (goals, makefiles)
                       FILE_TIMESTAMP mtime = MTIME (file);
                       check_renamed (file);
 
-                      if (file->updated && g->changed &&
+                      if ((file->command_state == cs_finished) && g->changed &&
                            mtime != file->mtime_before_update)
                         {
                           /* Updating was done.  If this is a makefile and
@@ -195,7 +195,7 @@ update_goal_chain (goals, makefiles)
 
              /* Keep track if any double-colon entry is not finished.
                  When they are all finished, the goal is finished.  */
-             any_not_updated |= !file->updated;
+             any_not_updated |= !(file->command_state == cs_finished);
 
              if (stop)
                break;
@@ -342,7 +342,7 @@ update_file_1 (file, depth)
 
   DBF (DB_VERBOSE, _("Considering target file `%s'.\n"));
 
-  if (file->updated)
+  if (file->command_state == cs_finished)
     {
       if (file->update_status > 0)
        {
@@ -670,7 +670,6 @@ update_file_1 (file, depth)
       break;
     }
 
-  file->updated = 1;
   return file->update_status;
 }
 \f
@@ -688,7 +687,6 @@ notice_finished_file (file)
   int ran = file->command_state == cs_running;
 
   file->command_state = cs_finished;
-  file->updated = 1;
 
   if (touch_flag
       /* The update status will be:
@@ -759,7 +757,6 @@ notice_finished_file (file)
     for (d = file->also_make; d != 0; d = d->next)
       {
        d->file->command_state = cs_finished;
-       d->file->updated = 1;
        d->file->update_status = file->update_status;
 
        if (ran && !d->file->phony)
@@ -1138,7 +1135,7 @@ f_mtime (file, search)
     static FILE_TIMESTAMP now = 0;
     if (!clock_skew_detected
         && mtime != (FILE_TIMESTAMP)-1 && mtime > now
-        && !file->updated)
+        && !(file->command_state == cs_finished))
       {
        /* This file's time appears to be in the future.
           Update our concept of the present, and compare again.  */