From a81013175c2b335c295378b0c826bdbede9fd0c4 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 26 Mar 2000 06:56:54 +0000 Subject: * Ignore attempt to change a file into itself. * Define COFLAGS to avoid unknown variable warning. * Fix some usec problems on UnixWare. * Don't remove .INTERMEDIATE targets specified on the command line. --- file.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index a1003a9..c64db0b 100644 --- a/file.c +++ b/file.c @@ -128,8 +128,7 @@ enter_file (name) char *lname, *ln; #endif - if (*name == '\0') - abort (); + assert (*name != '\0'); #if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS) lname = (char *)malloc (strlen (name) + 1); @@ -252,8 +251,9 @@ file_hash_enter (file, name, oldhash, oldname) if (strieq (oldfile->hname, name)) break; - /* If the old file is the same as the new file, something's wrong. */ - assert (oldfile != file); + /* If the old file is the same as the new file, never mind. */ + if (oldfile == file) + return; if (oldhash != 0 && (newbucket != oldbucket || oldfile != 0)) { @@ -394,7 +394,7 @@ remove_intermediates (sig) for (i = 0; i < FILE_BUCKETS; ++i) for (f = files[i]; f != 0; f = f->next) if (f->intermediate && (f->dontcare || !f->precious) - && !f->secondary) + && !f->secondary && !f->cmd_target) { int status; if (f->update_status == -1) -- cgit v1.2.3