summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1996-06-22 21:42:13 +0000
committerRoland McGrath <roland@redhat.com>1996-06-22 21:42:13 +0000
commit3024918fcd7c73b32e1446c9ec5d75ef93b981f6 (patch)
tree4b60498a0089106693918d055c4565db1afe3fa6
parentbdc49369ebca6df6d72db214c3ed4b778a51fcfa (diff)
downloadmake-3024918fcd7c73b32e1446c9ec5d75ef93b981f6.tar.gz
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.
-rw-r--r--file.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/file.c b/file.c
index aa31077..acc0fd6 100644
--- a/file.c
+++ b/file.c
@@ -1,5 +1,5 @@
/* 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.
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);
- 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'",
oldname, name);
- if (!oldfile->double_colon && file->double_colon)
- fatal ("can't rename double-colon `%s' to single-colon `%s'",
- oldname, name);
+ if (!oldfile->double_colon && file->double_colon)
+ {
+ 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)
/* %%% Kludge so -W wins on a file that gets vpathized. */
@@ -332,7 +337,7 @@ remove_intermediates (sig)
register int i;
register struct file *f;
char doneany;
-
+
if (question_flag || touch_flag)
return;
if (sig && just_print_flag)
@@ -412,7 +417,7 @@ snap_deps ()
free (d->name);
d->name = 0;
}
-
+
for (f = lookup_file (".PRECIOUS"); f != 0; f = f->prev)
for (d = f->deps; d != 0; d = d->next)
for (f2 = d->file; f2 != 0; f2 = f2->prev)
@@ -522,11 +527,11 @@ print_file (f)
if (!f->is_target)
puts ("# Not a target:");
printf ("%s:%s", f->name, f->double_colon ? ":" : "");
-
+
for (d = f->deps; d != 0; d = d->next)
printf (" %s", dep_name (d));
putchar ('\n');
-
+
if (f->precious)
puts ("# Precious file (dependency of .PRECIOUS).");
if (f->phony)