mirror of
https://github.com/mirror/make.git
synced 2024-12-27 13:20:34 +08:00
* Fix problems with double-colon rules.
* Fix problems with INTERMEDIATE rules.
This commit is contained in:
parent
1a35bfb45b
commit
af44f16799
12
ChangeLog
12
ChangeLog
@ -1,8 +1,18 @@
|
||||
1999-12-15 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* variable.c (print_variable): Print the variable with += if the
|
||||
append flag is set.
|
||||
|
||||
* implicit.c (pattern_search): Remove the extra check of the
|
||||
implicit flag added on 8/24/1998. This causes problems and the
|
||||
reason for the change was better resolved by the change made to
|
||||
check_deps() on 8/26/1998. This fixes PR/1423.
|
||||
|
||||
1999-12-08 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* dir.c (dir_setup_glob): On 64 bit ReliantUNIX (5.44 and above)
|
||||
in LFS mode, stat() is actually a macro for stat64(). Assignment
|
||||
doesn't work in that case. So, stat is a macro, make a local
|
||||
doesn't work in that case. So, if stat() is a macro, make a local
|
||||
wrapper function to invoke it.
|
||||
(local_stat): Wrapper function, if needed.
|
||||
Reported by Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru>.
|
||||
|
4
file.c
4
file.c
@ -654,8 +654,8 @@ print_file (f)
|
||||
file_timestamp_sprintf (buf, f->last_mtime);
|
||||
printf (_("# Last modified %s\n"), buf);
|
||||
}
|
||||
printf (_("# File has%s been updated.\n"),
|
||||
f->updated ? "" : _(" not"));
|
||||
puts (f->updated
|
||||
? _("# File has been updated.") : _("# File has not been updated."));
|
||||
switch (f->command_state)
|
||||
{
|
||||
case cs_running:
|
||||
|
@ -340,8 +340,6 @@ pattern_search (file, archive, depth, recursions)
|
||||
deps_found = 0;
|
||||
for (dep = rule->deps; dep != 0; dep = dep->next)
|
||||
{
|
||||
struct file *fp;
|
||||
|
||||
/* If the dependency name has a %, substitute the stem. */
|
||||
p = strchr (dep_name (dep), '%');
|
||||
if (p != 0)
|
||||
@ -395,12 +393,9 @@ pattern_search (file, archive, depth, recursions)
|
||||
dependency file we are actually looking for is in a different
|
||||
directory (the one gotten by prepending FILENAME's directory),
|
||||
so it might actually exist. */
|
||||
/* If we find a file but the intermediate flag is set, then it
|
||||
was put here by a .INTERMEDIATE: rule so ignore it. */
|
||||
|
||||
if ((!dep->changed || check_lastslash)
|
||||
&& (((fp = lookup_file (p)) != 0 && !fp->intermediate)
|
||||
|| file_exists_p (p)))
|
||||
&& (lookup_file (p) != 0 || file_exists_p (p)))
|
||||
{
|
||||
found_files[deps_found++] = xstrdup (p);
|
||||
continue;
|
||||
|
4
remake.c
4
remake.c
@ -323,8 +323,8 @@ update_file (file, depth)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This loop runs until we start a double colon rule, or until the
|
||||
chain is exhausted. */
|
||||
/* This loop runs until we start commands for a double colon rule, or until
|
||||
the chain is exhausted. */
|
||||
for (; f != 0; f = f->prev)
|
||||
{
|
||||
f->considered = considered;
|
||||
|
@ -1,3 +1,9 @@
|
||||
1999-12-15 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* scripts/targets/INTERMEDIATE: Add a test for PR/1423: make sure
|
||||
.INTERMEDIATE settings on files don't disable them as implicit
|
||||
intermediate possibilities.
|
||||
|
||||
1999-12-01 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* scripts/features/double_colon: Add a test for PR/1476: Try
|
||||
|
@ -82,5 +82,26 @@ $answer = "cp foo.f foo.e\ncp bar.f bar.e\ncat foo.e bar.e > foo.c\nrm foo.e bar
|
||||
|
||||
unlink('foo.f', 'foo.e', 'foo.d', 'foo.c', 'bar.f', 'bar.e', 'bar.d', 'bar.c');
|
||||
|
||||
# TEST #6 -- added for PR/1423
|
||||
|
||||
$makefile2 = &get_tmpfile;
|
||||
|
||||
open(MAKEFILE, "> $makefile2");
|
||||
|
||||
print MAKEFILE <<'EOF';
|
||||
all: foo
|
||||
foo.a: ; touch $@
|
||||
%: %.a ; touch $@
|
||||
.INTERMEDIATE: foo.a
|
||||
EOF
|
||||
|
||||
close(MAKEFILE);
|
||||
|
||||
&run_make_with_options($makefile2, "-R", &get_logfile);
|
||||
$answer = "touch foo.a\ntouch foo\nrm foo.a\n";
|
||||
&compare_output($answer, &get_logfile(1));
|
||||
|
||||
unlink('foo');
|
||||
|
||||
# This tells the test driver that the perl test script executed properly.
|
||||
1;
|
||||
|
@ -1008,7 +1008,7 @@ print_variable (v, prefix)
|
||||
{
|
||||
register char *p;
|
||||
|
||||
printf ("%s %s= ", v->name, v->recursive ? "" : ":");
|
||||
printf ("%s %s= ", v->name, v->recursive ? v->append ? "+" : "" : ":");
|
||||
|
||||
/* Check if the value is just whitespace. */
|
||||
p = next_token (v->value);
|
||||
|
Loading…
Reference in New Issue
Block a user