Sat Aug 19 23:11:00 1995 Richard Stallman <rms@mole.gnu.ai.mit.edu>

* remake.c (check_dep): For a secondary file, try implicit and
	default rules if appropriate.
Wed Aug  2 04:29:42 1995  Richard Stallman  <rms@mole.gnu.ai.mit.edu>

	* remake.c (check_dep): If an intermediate file exists,
	do consider its actual date.
This commit is contained in:
Roland McGrath 1996-03-20 00:56:45 +00:00
parent e044fe76f6
commit b8ea37e31c

View file

@ -706,11 +706,39 @@ check_dep (file, depth, this_mtime, must_make_ptr)
}
else
{
/* FILE is an intermediate file.
Update all non-intermediate files we depend on, if necessary,
and see whether any of them is more recent than the file
on whose behalf we are checking. */
/* FILE is an intermediate file. */
time_t mtime;
if (!file->phony && file->cmds == 0 && !file->tried_implicit
&& file->secondary)
{
if (try_implicit_rule (file, depth))
DEBUGPR ("Found an implicit rule for `%s'.\n");
else
DEBUGPR ("No implicit rule found for `%s'.\n");
file->tried_implicit = 1;
}
if (file->cmds == 0 && !file->is_target && file->secondary
&& default_file != 0 && default_file->cmds != 0)
{
DEBUGPR ("Using default commands for `%s'.\n");
file->cmds = default_file->cmds;
}
/* If the intermediate file actually exists
and is newer, then we should remake from it. */
check_renamed (file);
mtime = file_mtime (file);
check_renamed (file);
if (mtime > this_mtime)
*must_make_ptr = 1;
/* Otherwise, update all non-intermediate files we depend on,
if necessary, and see whether any of them is more
recent than the file on whose behalf we are checking. */
else
{
register struct dep *lastd;
lastd = 0;
d = file->deps;
while (d != 0)
@ -751,6 +779,7 @@ check_dep (file, depth, this_mtime, must_make_ptr)
d = d->next;
}
}
}
file->updating = 0;
return dep_status;