mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2024-12-25 05:29:47 +00:00
* 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.
This commit is contained in:
parent
75f879f37f
commit
a81013175c
7 changed files with 49 additions and 13 deletions
25
ChangeLog
25
ChangeLog
|
@ -1,3 +1,28 @@
|
|||
2000-03-26 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* file.c (remove_intermediates): Never remove targets explicitly
|
||||
requested on the command-line by checking the cmd_target flag.
|
||||
Fixed PR/1669.
|
||||
|
||||
2000-03-23 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* filedef.h (FILE_TIMESTAMP_STAT_MODTIME): Don't use
|
||||
st_mtim.tv_sec; this doesn't work on Unixware.
|
||||
|
||||
2000-03-18 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* file.c (file_hash_enter): If we're trying to change a file into
|
||||
itself, just return. We used to assert this wasn't true, but
|
||||
someone came up with a weird case involving archives. After
|
||||
playing with it for a while I decided it was OK to ignore it.
|
||||
|
||||
* default.c: Define COFLAGS to empty to avoid spurious warnings.
|
||||
|
||||
* filedef.h: Change #if ST_MTIM_NSEC to #ifdef; this is a macro
|
||||
containing the name of the nsec field, not true/false.
|
||||
* make.h: Ditto.
|
||||
Reported by Marco Franzen <Marco.Franzen@Thyron.com>.
|
||||
|
||||
2000-02-09 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* Version 3.78.91 released.
|
||||
|
|
|
@ -396,10 +396,10 @@ static char *default_variables[] =
|
|||
|
||||
/* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist,
|
||||
and to the empty string if $@ does exist. */
|
||||
"CHECKOUT,v",
|
||||
"+$(if $(wildcard $@),,$(CO) $(COFLAGS) $< $@)",
|
||||
|
||||
"CHECKOUT,v", "+$(if $(wildcard $@),,$(CO) $(COFLAGS) $< $@)",
|
||||
"CO", "co",
|
||||
"COFLAGS", "",
|
||||
|
||||
"CPP", "$(CC) -E",
|
||||
#ifdef CRAY
|
||||
"CF77PPFLAGS", "-P",
|
||||
|
|
10
file.c
10
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)
|
||||
|
|
|
@ -117,9 +117,9 @@ extern void set_command_state PARAMS ((struct file *file, int state));
|
|||
extern void notice_finished_file PARAMS ((struct file *file));
|
||||
|
||||
|
||||
#if ST_MTIM_NSEC
|
||||
#ifdef ST_MTIM_NSEC
|
||||
# define FILE_TIMESTAMP_STAT_MODTIME(st) \
|
||||
FILE_TIMESTAMP_FROM_S_AND_NS ((st).st_mtim.tv_sec, \
|
||||
FILE_TIMESTAMP_FROM_S_AND_NS ((st).st_mtime, \
|
||||
(st).st_mtim.ST_MTIM_NSEC)
|
||||
# define FILE_TIMESTAMPS_PER_S \
|
||||
MIN ((FILE_TIMESTAMP) 1000000000, \
|
||||
|
|
2
make.h
2
make.h
|
@ -275,7 +275,7 @@ extern char *alloca ();
|
|||
# endif /* HAVE_ALLOCA_H. */
|
||||
#endif /* GCC. */
|
||||
|
||||
#if ST_MTIM_NSEC
|
||||
#ifdef ST_MTIM_NSEC
|
||||
# if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
# endif
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2000-03-26 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* scripts/targets/INTERMEDIATE: Test that make doesn't remove
|
||||
.INTERMEDIATE files when given on the command line (PR/1669).
|
||||
|
||||
2000-02-07 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* scripts/features/escape: Add a test for backslash-escaped spaces
|
||||
|
|
|
@ -77,9 +77,15 @@ sleep($wtime);
|
|||
$answer = "cp foo.f foo.e\ncp bar.f bar.e\ncat foo.e bar.e > foo.c\nrm foo.e bar.e\n";
|
||||
&compare_output($answer, &get_logfile(1));
|
||||
|
||||
# TEST #6 -- added for PR/1669: don't remove files mentioned on the cmd line.
|
||||
|
||||
&run_make_with_options($makefile,'foo.e',&get_logfile);
|
||||
$answer = "cp foo.f foo.e\n";
|
||||
&compare_output($answer, &get_logfile(1));
|
||||
|
||||
unlink('foo.f', 'foo.e', 'foo.d', 'foo.c', 'bar.f', 'bar.e', 'bar.d', 'bar.c');
|
||||
|
||||
# TEST #6 -- added for PR/1423
|
||||
# TEST #7 -- added for PR/1423
|
||||
|
||||
$makefile2 = &get_tmpfile;
|
||||
|
||||
|
@ -94,7 +100,7 @@ EOF
|
|||
|
||||
close(MAKEFILE);
|
||||
|
||||
&run_make_with_options($makefile2, "-R", &get_logfile);
|
||||
&run_make_with_options($makefile2, '-R', &get_logfile);
|
||||
$answer = "touch foo.a\ntouch foo\nrm foo.a\n";
|
||||
&compare_output($answer, &get_logfile(1));
|
||||
|
||||
|
|
Loading…
Reference in a new issue