mirror of
https://github.com/mirror/make.git
synced 2025-03-27 20:40:35 +08:00
Sat Jun 22 14:56:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* file.c (file_hash_enter): Allow renaming :: to : when latter is non-target, or : to :: when former is non-target.
This commit is contained in:
parent
bdc49369eb
commit
3024918fcd
23
file.c
23
file.c
@ -1,5 +1,5 @@
|
|||||||
/* Target file hash table management for GNU Make.
|
/* Target file hash table management for GNU Make.
|
||||||
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
|
Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify
|
||||||
@ -295,12 +295,17 @@ in favor of those for `%s'.",
|
|||||||
|
|
||||||
merge_variable_set_lists (&oldfile->variables, file->variables);
|
merge_variable_set_lists (&oldfile->variables, file->variables);
|
||||||
|
|
||||||
if (oldfile->double_colon && !file->double_colon)
|
if (oldfile->double_colon && file->is_target && !file->double_colon)
|
||||||
fatal ("can't rename single-colon `%s' to double-colon `%s'",
|
fatal ("can't rename single-colon `%s' to double-colon `%s'",
|
||||||
oldname, name);
|
oldname, name);
|
||||||
if (!oldfile->double_colon && file->double_colon)
|
if (!oldfile->double_colon && file->double_colon)
|
||||||
fatal ("can't rename double-colon `%s' to single-colon `%s'",
|
{
|
||||||
oldname, name);
|
if (oldfile->is_target)
|
||||||
|
fatal ("can't rename double-colon `%s' to single-colon `%s'",
|
||||||
|
oldname, name);
|
||||||
|
else
|
||||||
|
oldfile->double_colon = file->double_colon;
|
||||||
|
}
|
||||||
|
|
||||||
if (file->last_mtime > oldfile->last_mtime)
|
if (file->last_mtime > oldfile->last_mtime)
|
||||||
/* %%% Kludge so -W wins on a file that gets vpathized. */
|
/* %%% Kludge so -W wins on a file that gets vpathized. */
|
||||||
@ -332,7 +337,7 @@ remove_intermediates (sig)
|
|||||||
register int i;
|
register int i;
|
||||||
register struct file *f;
|
register struct file *f;
|
||||||
char doneany;
|
char doneany;
|
||||||
|
|
||||||
if (question_flag || touch_flag)
|
if (question_flag || touch_flag)
|
||||||
return;
|
return;
|
||||||
if (sig && just_print_flag)
|
if (sig && just_print_flag)
|
||||||
@ -412,7 +417,7 @@ snap_deps ()
|
|||||||
free (d->name);
|
free (d->name);
|
||||||
d->name = 0;
|
d->name = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (f = lookup_file (".PRECIOUS"); f != 0; f = f->prev)
|
for (f = lookup_file (".PRECIOUS"); f != 0; f = f->prev)
|
||||||
for (d = f->deps; d != 0; d = d->next)
|
for (d = f->deps; d != 0; d = d->next)
|
||||||
for (f2 = d->file; f2 != 0; f2 = f2->prev)
|
for (f2 = d->file; f2 != 0; f2 = f2->prev)
|
||||||
@ -522,11 +527,11 @@ print_file (f)
|
|||||||
if (!f->is_target)
|
if (!f->is_target)
|
||||||
puts ("# Not a target:");
|
puts ("# Not a target:");
|
||||||
printf ("%s:%s", f->name, f->double_colon ? ":" : "");
|
printf ("%s:%s", f->name, f->double_colon ? ":" : "");
|
||||||
|
|
||||||
for (d = f->deps; d != 0; d = d->next)
|
for (d = f->deps; d != 0; d = d->next)
|
||||||
printf (" %s", dep_name (d));
|
printf (" %s", dep_name (d));
|
||||||
putchar ('\n');
|
putchar ('\n');
|
||||||
|
|
||||||
if (f->precious)
|
if (f->precious)
|
||||||
puts ("# Precious file (dependency of .PRECIOUS).");
|
puts ("# Precious file (dependency of .PRECIOUS).");
|
||||||
if (f->phony)
|
if (f->phony)
|
||||||
|
Loading…
Reference in New Issue
Block a user