From: Tim Magill Date: Wed, 9 Feb 2000 05:49:41 +0000 (+0000) Subject: removed updated member from struct filedef X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=3b4369f1704ca17b3824a61e9f152aff739b334f;p=thirdparty%2Fmake.git removed updated member from struct filedef --- diff --git a/ChangeLog b/ChangeLog index 3888642b..24e4d16b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2000-02-09 Tim Magill + 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 For += target-specific variables we need to remember which diff --git a/file.c b/file.c index a1003a98..28de9422 100644 --- 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) { diff --git a/filedef.h b/filedef.h index 8712e986..dd4988db 100644 --- 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 0cc72ec9..824b614f 100644 --- 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) diff --git a/remake.c b/remake.c index d4c8a03a..1abea0d2 100644 --- 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; } @@ -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. */